Courseiva
Performance Tuning And DiagnosticshardMultiple ChoiceObjective-mapped

OCP Performance Tuning And Diagnostics Practice Question

You have a query that is performing poorly due to a stale execution plan. You want to lock the current optimal plan to prevent the optimizer from changing it during subsequent runs. What should you do?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE

SQL Plan Baselines allow you to store and fix execution plans for specific SQL statements.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Run DBMS_STATS.LOCK_TABLE_STATS

    Why it's wrong here

    This prevents statistics updates, not plan changes.

  • Use DBMS_SPM.LOAD_PLANS_FROM_CURSOR_CACHE

    Why this is correct

    This function creates a baseline from the cursor cache, locking the plan.

  • Set OPTIMIZER_FEATURES_ENABLE to a previous version

    Why it's wrong here

    This is a global parameter, not specific to one SQL statement.

  • Use SQL Tuning Advisor to accept a new profile

    Why it's wrong here

    This recommends new plans, it does not lock existing ones.

About these practice questions

One of 312 original OCP practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official Oracle exam blueprint

This OCP practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the OCP exam.