QuestionQ112

VerifiedMonitoring and Tuning Database Performance

Examine the execution plan:

Question Image

The optimizer must create a plan that uses an indexed access method with index IX_SALES_TIME_ID on column SALES.TIME_ID.

The SPFILE contains the following parameters:

Question Image

Which action will cause index IX_SALES_TIME_ID to be accessed?

Explanation

Setting OPTIMIZER_MODE to FIRST_ROWS_100 changes the cost-based optimizer goal from overall throughput to the best response time for the first 100 rows. This makes an index-driven access path through SALES.TIME_ID preferable to scanning SALES in full when rows can be returned early. OPTIMIZER_MODE=ALL_ROWS instead optimizes for completion throughput, which favors the displayed full scan and hash-join strategy. Oracle documents that FIRST_ROWS_n optimizes for response time for the first n rows, whereas ALL_ROWS optimizes for minimum resource use to complete the statement.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!