Prev Question
Next Question

Which three statements are true about SQL plan directives?

A.
They are tied to a specific statement or SQL ID.

B.
They instruct the maintenance job to collect missing statistics or perform dynamic sampling to generate a
more optimal plan.

C.
They are used to gather only missing statistics.

D.
They are created for a query expression where statistics are missing or the cardinality estimates by the
optimizer are incorrect.

E.
They instruct the optimizer to create only column group statistics.

F.
Improve plan accuracy by persisting both compilation and execution statistics in the SYSAUX tablespace.

Explanation:
During SQL execution, if a cardinality misestimate occurs, then the database creates SQL plan directives.
During SQL compilation, the optimizer examines the query corresponding to the directive to determine whether
missing extensions or histograms exist (D). The optimizer records any missing extensions. Subsequent
DBMS_STATS calls collect statistics for the extensions.
The optimizer uses dynamic sampling whenever it does not have sufficient statistics corresponding to the
directive. (B, not C)
E: Currently, the optimizer monitors only column groups. The optimizer does not create an extension on
expressions.
Incorrect:
Not A: SQL plan directives are not tied to a specific SQL statement or SQL ID.
Note:
* A SQL plan directive is additional information and instructions that the optimizer can use to generate a more
optimal plan. For example, a SQL plan directive can instruct the optimizer to record a missing extension.

Prev Question
Next Question

Leave a Reply

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