지금 지원 담당자와 채팅
지원 담당자와 채팅

SQL Optimizer for Oracle 9.3.3 - User Guide

Welcome to SQL Optimizer
About SQL Optimizer SQL Optimization Workflow New in This Release Additional Resources Database Privileges Database Privileges Script Connect to the Database Windows Layout Customize Toolbars Keyboard Shortcuts Support Bundle Register SQL Optimizer Check for Updates SQL Operations
ALL PARTITION ALTER INDEX AND EQUAL ANTI JOIN BITMAP AND BITMAP COMPACTION BITMAP CONSTRUCTION BITMAP CONVERSION BITMAP INDEX BITMAP JOIN INDEX UPDATE BITMAP JOIN INDEX UPDATE STATEMENT BITMAP KEY ITERATION BITMAP MERGE BITMAP MINUS BITMAP OR BUFFER SORT CARTESIAN JOIN COLLECTION ITERATOR CONCATENATION CONNECT BY CONNECT BY PUMP COUNT COUNT STOPKEY CREATE AS SELECT CUBE SCAN DDL STATEMENT DELETE DOMAIN INDEX FAST FULL INDEX SCAN FILTER FIRST ROWS FIXED INDEX FIXED TABLE FOR UPDATE FULL INDEX SCAN FULL INDEX SCAN DESCENDING FULL INDEX SCAN (MIN/MAX) HASH GROUP BY HASH GROUP BY PIVOT HASH JOIN HASH JOIN BUFFERED HASH PARTITION HASH UNIQUE INDEX INDEX BUILD NON UNIQUE INDEX RANGE SCAN INDEX RANGE SCAN DESCENDING INDEX RANGE SCAN (MIN/MAX) INDEX SAMPLE FAST FULL SCAN INDEX SKIP SCAN INDEX SKIP SCAN DESCENDING INDEX UNIQUE SCAN INLIST ITERATOR INLIST PARTITION INSERT INTERSECTION INTO INVALID PARTITION ITERATOR PARTITION LOAD AS SELECT MAT_VIEW ACCESS MAT_VIEW REWRITE ACCESS MERGE JOIN MINUS MULTI-TABLE INSERT NESTED LOOPS OUTER JOIN PARTITION PARTITION HASH EMPTY PARTITION LIST PARTITION RANGE PROJECTION PX BLOCK ITERATOR PX COORDINATOR PX ITERATOR PX PARTITION PX PARTITION HASH ALL PX PARTITION LIST ALL PX PARTITION RANGE ALL PX RECEIVE PX SEND RANGE PARTITION RECURSIVE EXECUTION RECURSIVE WITH PUMP REFERENCE MODEL REMOTE SELECT SEMI JOIN SEQUENCE SINGLE PARTITION SINGLE RANGE PARTITION SORT SORT AGGREGATE SORT GROUP BY SORT GROUP BY CUBE SORT GROUP BY NOSORT SORT GROUP BY ROLLUP SORT JOIN SORT ORDER BY SORT UNIQUE SQL MODEL TABLE ACCESS TABLE ACCESS BY GLOBAL INDEX ROWID TABLE ACCESS BY INDEX ROWID TABLE ACCESS BY LOCAL INDEX ROWID TABLE ACCESS BY ROWID TABLE ACCESS BY USER ROWID TABLE ACCESS CLUSTER TABLE ACCESS FULL TABLE ACCESS HASH TABLE ACCESS SAMPLE TABLE QUEUE TEMP TABLE GENERATION TEMP TABLE TRANSFORMATION UNION UNION ALL UNION ALL (RECURSIVE WITH) UNPIVOT UPDATE VIEW VIEW PUSHED PREDICATE WINDOW
Optimize SQL
Create Optimize SQL Sessions Open Optimizer SQL Sessions Rewrite SQL Generate Execution Plan Alternatives
Optimize Indexes Batch Optimize SQL Scan SQL Inspect SGA Analyze Impact Manage Plans Configure Options SQL Optimizer Tutorials About Us Legal Notices

Use Execution Plans

About Execution Plans

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.

Reviewing Execution Plans

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

  1. Right-click the execution plan and select View Plan | option.
  2. Select one of the following formats:
    • Tree Plan—Displays plan as tree view with numbered steps.
    • DBMS_XPlan (Formatted)—Displays plan using the DBMS_XPLAN output with added formatting.
    • DBMS_XPlan (Plain Text)—Displays plan using the DBMS_XPlan output as plain text. This is the format returned by Oracle.
    • Graphic Plan—Displays a graphic view of the plan. Includes numbered steps.
    • MS Graphic Plan—Displays a graphic type view. Includes numbered steps.
    • Plain Language Plan—Lists steps using descriptions in plain language.
  3. Go to Review Execution Plans to learn more about the different plan formats and how to customize them.

Execution Plan Window - Optimize SQL

The Execution Plan window displays the available execution plans. Each tab contains a different type of execution plan.

  • Default Plan—The Default Plan tab displays the execution plan chosen by Oracle and is retrieved using the EXPLAIN PLAN statement. Click to retrieve the default plan after entering/importing the original SQL.
  • 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.

  • Virtual Plan—The Virtual Plan tab is displayed for indexes when you generate index alternatives in an Optimize SQL, SQL Rewrite session. See Fill Missing Execution Plans for more information about retrieving other execution plans for index alternatives.

Execution Plan Actions

Right-click in the Execution Plan window to select from the following actions:

Action

Description

Copy

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.

Print

Opens the print window so you can print the execution plan.

View 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.

Animate Plan Steps

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.

 

Related Topics

Fill Missing Execution Plans

Copy Execution Plans

Review Execution Plans

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

  1. Select a SQL statement.

  2. Right-click the execution plan and select View Plan | option.
  3. Select one of the following formats:

    • Tree Plan
    • DBMS_XPlan (Formatted)
    • DBMS_XPlan (Plain Text)
    • Graphic Plan
    • MS Graphic Plan
    • Plain Language Plan
  4. For more information about each format, review the following sections.

Plan Formats

To use the Tree Plan

  1. Right-click an execution plan and select View Plan | As Tree Plan.

  2. Review the steps. The first line of the execution plan displays the SQL statement type, such as SELECT. The remaining lines represent an operation. The steps are numbered in the order of execution to make the plan easier to read.
  3. Select a layout style for the tree plan from the Execution Plan toolbar (right panel). Each style displays different plan details (operators, predicates, statistics).

  4. 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.

    • Select the items to include (such as cost, disk reads/writes).
    • Select which items to display as columns.
  5. To get additional Help on a step, select the step. Then right-click and select Help on plan step.
  6. 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.

  7. To animate the steps, right-click the plan and select Animate Plan Steps.

To use DBMS_XPlan

  1. Right-click an execution plan and select View Plan | As DBMS_XPlan (Formatted) or DBMS_XPlan (Plain Text).
  2. The plan displays using DBMS_XPLAN.
  3. 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

  1. Right-click an execution plan and select View Plan | As Plain Language Plan.

To use Graphic Plan

  1. Right-click an execution plan and select View Plan | As Graphic Plan.

  2. Hover over a step to display step details in a tooltip.
  3. To animate the steps, right-click the plan and select Animate Plan Steps.
  4. Right-click the plan and select Step Description to display the step description in plain language in the footer.
  5. To copy the plan as an image, right-click the plan and select Copy.

To use MS Graphic Plan

  1. Right-click an execution plan and select View Plan | As MS Graphic Plan.

  2. The available options are the same as the 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.

Customize Tree Plan

To customize font style and color

  1. Go to Options | General | Execution Plan.
  2. You can customize text color and font style for each item in a plan. Settings apply to all Execution Plan panes. See Execution Plan Options for more information.
    • You can also specify warning thresholds for applying highlighting.

Customize Execution Plan Window

To display step description in footer

  • Right-click the plan and select Step Description. A description of the selected step displays in the footer of the Execution Plan pane. This is helpful when using one of the graphic displays.

To display additional plan information

  • Right-click the plan and select Plan Information to display additional information if the plan uses any of the following: cardinality feedback, dynamic sampling, SQL plan directives, or adaptive plan.

 

Related Topics

Animate Execution Plans

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.

 

Related Topics

Retrieve Execution Plans

Review Execution Plans

Fill Missing Execution Plans

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택