We would like to get explain plan for a SQL statement. The SQL statement is,
Select * from gl_interface
Execute the following code to generate the explain plan
EXPLAIN PLAN SET STATEMENT_ID = 'ray' FOR SELECT * FROM gl_interface;
After executing the previous statement you need to extract the explain plan from the database. Execute the following,
SELECT * FROM TABLE (DBMS_XPLAN.display ('plan_table', 'ray'));
On executing this SQL you will get,
You can now see the explain plan in the output of the query.
Cheers!
Related articles
- Restrict Profile options values to a list (oraclemaniac.com)