Thursday, March 7, 2024

How to generate and display the execution plan

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

No comments:

Post a Comment

We’re thrilled to announce that a New Oracle RAC Batch is starting on 📅 Thursday, 23-Nov-2025!

🚀 Exciting Announcement! We’re thrilled to announce that a New Oracle RAC Batch is starting on 📅 Thursday, 23-Nov-2025! Demo Sessions ar...