The execution plan displays the steps a database takes to execute a SQL statement. You can use the execution plan to determine if a statement is efficient.
In the step formats (like Tree Plan) each step indicates how SQL Optimizer retrieves rows of data. The steps are numbered in the order of execution to make the plan easier to read.
Oracle executes each child operation before the parent operation. For some SQL statements, Oracle executes the parent operation once it retrieves a single row from the child operation. Other SQL statements require that Oracle retrieve all rows from the child operation before it executes the parent operation.
Use the Execution Plan window to review the execution plan for the original SQL statement or selected alternative. Several display options and configurations are available.
You can select an execution plan format, configure plan content, and customize plan text.
To select a plan format
The Execution Plan window displays the available execution plans. Each tab contains a different type of execution plan.
Actual Plan—The Actual Plan is retrieved from the plan cache after execution and is the actual execution plan performed by the database to execute the statement.
Right-click in the Execution Plan window to select from the following actions:
Action |
Description |
---|---|
Copies the execution plan to the clipboard. | |
Save |
Saves the execution plan as a .jpg file. The DBMS_XPlan formats can be saved as a .txt file also. |
|
Opens the print window so you can print the execution plan. |
Allows you to change how the execution plan is displayed. | |
Step Description | Select this option to display a description of the selected step in the Execution Plan pane footer. |
Plan Information |
If you select this option, SQL Optimizer identifies whether an execution plan uses any of the following: cardinality feedback, dynamic sampling, SQL plan directives, or adaptive plan. If applicable, the information displays in the Execution Plan pane directly above the Execution Plan tab. |
Highlights, one-by-one, the execution plan steps. | |
Plan Options |
Opens the Execution Plan Options window so you can select which information is displayed in the execution plan and whether to display specific items as a column. |
Help on plan step |
Displays the help text for the currently selected step in the execution plan. |
Help on Execution Plan |
Opens online help for the Execution Plan window. |
SQL Optimizer provides a variety of formats for displaying an execution plan. After selecting a plan format, you can customize the plan display and the Execution Plan window.
To select a plan format
Select a SQL statement.
Select one of the following formats:
To use the Tree Plan
Right-click an execution plan and select View Plan | As Tree Plan.
Select a layout style for the tree plan from the Execution Plan toolbar (right panel). Each style displays different plan details (operators, predicates, statistics).
To select which items/columns to display in the execution plan, right-click the plan and select Plan Options. The settings will apply to the current module only.
In the Actual Plan tab, to display a comparison of Oracle estimates and actual statistics, click the Plan Comparison button in the Execution Plan toolbar.
To use DBMS_XPlan
To select a display level for DBMS_XPlan (Formatted), click the arrow beside the Switch DBMS_XPlan level button and select an option.
To use the Plain Language Plan
Right-click an execution plan and select View Plan | As Plain Language Plan.
To use Graphic Plan
Right-click an execution plan and select View Plan | As Graphic Plan.
To use MS Graphic Plan
Right-click an execution plan and select View Plan | As MS Graphic Plan.
To return to previous view
To return to your previous view, click the Switch View Plan button at the bottom of the Execution Plan toolbar. Use this button to easily toggle between two views. Click the arrow to select a different view.
To customize font style and color
To display step description in footer
To display additional plan information
You can animate each step in the execution plan in the order SQL Optimizer executes them.
To animate the execution plan or cancel the animation
» | Right-click the execution plan and select Animate Plan Steps. |
You can copy an execution plan from the Execution Plan pane and paste it into another file as text or a bitmap image.
To copy an execution plan
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Conditions d’utilisation Confidentialité Cookie Preference Center