EXPLAIN PLAN

The Oracle optimizer should select the best execution plan for SQL statements. If there is a problem with the performance of a SQL statement, you may want to see the execution path choices the optimizer made for the statement. The EXPLAIN PLAN statement can produce this information.

Tip

The execution plan produced by the EXPLAIN PLAN statement may not exactly match the execution plan used at runtime, because of differences in the two environments. The SQL_PLAN data dictionary views, new in Oracle9i, contain information about the actual execution plan used at runtime. See Chapter 6 for more information about these views.

Get Oracle in a Nutshell 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.