How to generate and display the execution plan

By mallik034vismobang07 Mar 20241 min read
How to generate and display the execution plan:
========================================================
Option 1: Generating and displaying the execution plan for the last SQL statement executed in your session:
select * from MALLIK.STUDENT;
SET LINESIZE 150 
SET PAGESIZE 2000 
SELECT * FROM table (DBMS_XPLAN.DISPLAY_CURSOR); 
select plan_table_output from table(dbms_xplan.display_cursor(null,null,’basic’));
Option 2: Generating and displaying the execution plan from SQL_ID
SET LINESIZE 150 
SET PAGESIZE 2000 
SELECT * FROM table (DBMS_XPLAN.DISPLAY_CURSOR(‘atfg645km3ykp’));
SELECT * FROM table(dbms_xplan.display_cursor(‘fnrtqw9c233tt’,null,’basic’));
Regards,
Mallik
M
Mallikarjun Ramadurg

Oracle ACE Pro • Oracle SME & Founder of Vismo Technologies. Sharing practical Oracle DBA, RAC and Exadata knowledge.

Get the weekly Vismo digestNew Oracle articles and Q&A in your inbox. No spam.

One email a week. Unsubscribe any time.