My Oracle Support Banner

* How to Obtain a Formatted Explain Plan - Recommended Methods (Doc ID 235530.1)

Last updated on OCTOBER 31, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 8.1.5.0 and later
Oracle Database - Standard Edition - Version 7.0.16.0 and later
Oracle Database - Personal Edition - Version 7.1.4.0 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Information in this document applies to any platform.

Goal

This article outlines how to use Oracle supplied utilities to obtain a formatted explain plan.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Obtaining a Formatted Explain Plan
 Manual Methods of Displaying the Plan
 SQL_ID and HASH_VALUE of the SQL
 Version 10.2 and higher
 Last Executed SQL
 SQL_ID and child number of the SQL are known
 gather_plan_statistics hint
 Plan from Memory
 From Automatic Workload Repository (AWR)
 From SQL Tuning Set (STS)
 From SQL Plan Baseline
 Identifying the SQL
 sql_id:
 cursor_child_no:
 Legacy Information
 Version 9.2 and higher
 Dbms_xplan
 v$sql_plan
 Versions 8.1.7 and 9.0.1
 Serial Plans
 Parallel Plans
 Autotrace
 Creating Plan Table
 Populating  the Plan Table
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.