QuestionQ39

VerifiedProactive Performance Management

Examine the parameter for your database instance:

Question Image

You generated the execution plan for the following query in the plan table and observed that a nested loop join was performed. After the query actually executed, you observed that a hash join was performed in the execution plan:

Question Image

Identify why the optimizer selected different execution plans.

Explanation

An adaptive plan can defer the join-method decision until execution, using run-time row-count information to choose the appropriate predefined branch. It can therefore change from a nested-loops join to a hash join during execution. With optimizer_adaptive_reporting_only set to FALSE, this adaptive behavior is active rather than limited to reporting. Oracle documents that an adaptive query plan can switch a nested-loops join to a hash join during execution.

Learn more

Community Discussion

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