Sample Exam Questions

From the objective of OSS-DB Exam Gold
- Performance Tuning - Parameters related to performance

Sample Question

3.03

Select all the statements that are correct regarding query plans.

  1. Disabling enable_indexscan prevents the query planner from using index scans.

  2. Disabling enable_seqscan prevents the query planner from using sequential scans.

  3. Setting random_page_cost lower than seq_page_cost causes the query planner to favor index scans.

  4. Setting random_page_cost higher than seq_page_cost causes the query planner to favor index scans.

  5. Setting default_statistics_target to a smaller value can lead to the collection of more detailed statistics, potentially improving the quality of the planner's estimates.

※This sample exam is different from those that appear in the actual OSS-DB Exam.
2025/06/02

Answer and Explanation

Disabling enable_indexscan will prevent the planner from selecting index scans.
Disabling enable_seqscan will prevent the planner from selecting sequential scans if at all possible. However, it will still result in a sequential scan, for example, for a scan on a table with no indexes defined.

seq_page_cost sets the planner's estimated cost for sequential disk reads.
On the other hand, random_page_cost sets the planner's estimated cost for random disk reads.
A smaller value for random_page_cost compared to seq_page_cost will cause the planner to use more index scans.

Setting a larger value for default_statistics_target will improve the accuracy of the planner's estimates. However, a larger value for default_statistics_target will increase ANALYZE processing time.

Therefore, the correct answers are A and C.