User Tools

Site Tools


adaptiveplans

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
adaptiveplans [2015/07/22 13:28] z0hpvkadaptiveplans [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 3: Line 3:
 At runtime the cardinality of operations is checked and compared to the cardinality estimates used to generate the execution plan. If the cardinality of the operation is not as expected, an alternative subplan can be used.\\ At runtime the cardinality of operations is checked and compared to the cardinality estimates used to generate the execution plan. If the cardinality of the operation is not as expected, an alternative subplan can be used.\\
  
-To view the whole adaptive plan run the following after you SQL statement+To view the whole adaptive plan run the following after your SQL statement
 <code>SELECT * FROM TABLE(DBMS_XPLAN.display_cursor(format => 'adaptive'));</code> <code>SELECT * FROM TABLE(DBMS_XPLAN.display_cursor(format => 'adaptive'));</code>
 Use the following to also see the expected and actual cardinalities.\\ Use the following to also see the expected and actual cardinalities.\\
 +You will also need to add the GATHER_PLAN_STATISTICS hint to the SQL query.
 <code>SELECT * FROM TABLE(DBMS_XPLAN.display_cursor(format => 'adaptive allstats last'));</code> <code>SELECT * FROM TABLE(DBMS_XPLAN.display_cursor(format => 'adaptive allstats last'));</code>
 +With an adaptive plan you may see differences between the estimated rows (E-Rows) and actual rows (A-Rows).\\
 +
 +The V$SQL view has a new column called IS_RESOLVED_ADAPTIVE_PLAN.\\
 +This column can have a value of null, Y or N\\
 +  * Null : Non-Adapative Plan
 +  * Y    : Adaptive Plan and a final plan has been selected
 +  * N    : Adaptive Plan but the final plan has not yet been decided on
 +
 +Initialisation Parameter: OPTIMIZER_ADAPTIVE_REPORTING_ONLY (Default value FALSE).\\
 +When set to TRUE information needed to enable adaptive join methods will be gathered only. No action is taken to change the plan.
adaptiveplans.1437571721.txt.gz · Last modified: 2025/03/08 22:23 (external edit)