Which two steps do you perform to ensure that the optimizer uses the second plan (in blue) if the plan is more efficient?

View the Exhibit and examine the plans in the SQL plan baseline.You observe that the last two
SELECT statements (outlined in red and blue) are identical, but have two different plans. Also, the
second plan (in blue) is not being used by the optimizer.Which two steps do you perform to ensure
that the optimizer uses the second plan (in blue) if the plan is more efficient? (Choose two.)

View the Exhibit and examine the plans in the SQL plan baseline.You observe that the last two
SELECT statements (outlined in red and blue) are identical, but have two different plans. Also, the
second plan (in blue) is not being used by the optimizer.Which two steps do you perform to ensure
that the optimizer uses the second plan (in blue) if the plan is more efficient? (Choose two.)

A.
Mark the second plan (in blue) as fixed.

B.
Use SQL Tuning Advisor to tune the plan.

C.
Use SQL Access Advisor to tune the plan.

D.
Use the DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE function to evolve the plan.



Leave a Reply 3

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


Bernardo Vale

Bernardo Vale

SQL Tunning Advisor doesn’t tune query Plan.

The correct answer is D and A.

If the plan is good DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE will mark it as ACCEPTED and will become a valid plan for use of optimizer.

Fixing it will tell Oracle that the plan has priority.

L. Zhu

L. Zhu

A is right. if a plan is fixed, it is always used
D is right. DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE is to verify unaccepted plan

So A.D. are correct

Michael

Michael

A is wrong. You have to make sure that the better plan of those two is used by the optimizer. If you mark the blue one as fixed, the other (red) one will always be ignored.

You can use SQL Tuning advisor for plan recommendations, we already have one. So B is not really necessary, but as we have to choose two answers: B and D