3.8 Using Explain Plan

Explain plan parses a query and records the plan that Oracle devises to execute it.

By examining this plan, you can find out if Oracle is picking the right indexes and joining your tables in the most efficient manner. It is not necessary to execute the command to view the explain plan.

3.8.1 Viewing an Explain Plan

From the SQL Commands page, enter or load the command whose plan you want to view and click the Explain tab.

To view the Explain Plan:

  1. On the Workspace home page, click SQL Workshop and then SQL Commands.

    The SQL Commands page appears.

  2. Enter or load the command whose plan you want to view.
  3. Click the Explain tab.

    The explain plan used by the optimizer appears in the display pane.

    The Explain Plan pane shows the plan used by the Oracle Optimizer to run your SQL command. It typically displays the Query Plan, Index Columns and Table Columns used.

    On the Explain Plan pane you can:

    • View object definitions. Click the object name in Query Plan to display the object definition in the Object Browser.

    • View index definitions. Click the index name in Table Columns to display the index definition in the Object Browser.