Which two options would you use for the optimizer?

You are administering a database supporting an OLTP workload where the users perform frequent
queries for fetching a new rows as possible, involving join operations on recently inserted data. In
addition at night, a few DSS queries are also performed. Examine the initialization parameters for the instance:

Which two options would you use for the optimizer?

You are administering a database supporting an OLTP workload where the users perform frequent
queries for fetching a new rows as possible, involving join operations on recently inserted data. In
addition at night, a few DSS queries are also performed. Examine the initialization parameters for the instance:

Which two options would you use for the optimizer?

A.
Set the OPTIMIZER_MODE initialization parameter to FIRST_ROWS_n.

B.
Add the hint ALL_ROWS in the DOS queries.

C.
Set the OPTIMIZER_INDEX_CACHING initialization parameter to 0.

D.
Add a hint INDEX_COMBINE in all DSS queries.

E.
Set the OPTIMIZER_INDEX_COST_ADJ initialization parameter to 100.

Explanation:
The last appended rows are more likely to be found quickly with FIRST_ROWS_n.
E: Make it not to prioritize index instead if table scan.
OPTIMIZER_INDEX_COST_ADJ
OPTIMIZER_INDEX_COST_ADJ lets you tune optimizer behavior for access path selection to be
more or less index friendly—that is, to make the optimizer more or less prone to selecting an index
access path over a full table scan.
The default for this parameter is 100 percent, at which the optimizer evaluates index access paths
at the regular cost. Any other value makes the optimizer evaluate the access path at that
percentage of the regular cost. For example, a setting of 50 makes the index access path look half
as expensive as normal.



Leave a Reply 7

Your email address will not be published. Required fields are marked *


vasya_pupkin

vasya_pupkin

I think A, B are correct

raka

raka

Agree with vasya A and B are the best answers

pvd

pvd

why not E ?

Sergey_Korolev

Sergey_Korolev

Is hint optimizers option?

Dariusz L

Dariusz L

Not E because this is an OLTP workload. Changing OPTIMIZER_INDEX_COST_ADJ to 100 will influence optimizer to prefer using full table scans over index scans (this is still small value to this parameter but the cost of index would grow anyway). This could result in degradation of performance for OLTP queries.
In this case DSS queries are something extra so by changing optimizer mode to ALL_ROWS for that queries we will not influence daily workload and we kill two firds with one stone.

sasa

sasa

I think A,D. Not B because optimizer_mode = ALL_ROWS

Aff

Aff

A + B
(A) will change optimizer_mode to [FIRST_ROWS_n] so you must add hint [ALL_ROWS] to DDS query