EXPLAIN PLAN Statement

Oracle has some tools that allow you to see the work Oracle will perform to satisfy the SQL statement. One such tool is an EXPLAIN PLAN statement, which contains the results of the EXPLAIN command. The results consist of steps ORACLE must perform to retrieve the data. Executing an EXPLAIN PLAN statement causes Oracle to analyze the target SQL statement and then to place the steps in an Oracle table called PLAN_TABLE.

To tune an SQL statement using the PLAN_TABLE table, perform the following steps:

1.
Create the PLAN_TABLE table. This is a one-time task. The results from previous EXPLAIN PLAN commands can be deleted, and the table can be reused. The PLAN_TABLE CREATE statement is contained in the Utlxplan.sql file located ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.