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

Automation Script | Archivelog Generation Hourly Monitoring

1. List out all the running databases and pic one database where we want to monitore the archive log generation from last 1 month. [oracle@o...