2026-03-12 20:23:15
This commit is contained in:
44
vg/xplan2.sql
Normal file
44
vg/xplan2.sql
Normal file
@@ -0,0 +1,44 @@
|
||||
@@header
|
||||
|
||||
/*
|
||||
*
|
||||
* Author : Vishal Gupta
|
||||
* Purpose : Display Execution plan from cursor cache
|
||||
* Parameters : 1 - SQL_ID
|
||||
*
|
||||
*
|
||||
* Revision History:
|
||||
* ===================
|
||||
* Date Author Description
|
||||
* --------- ------------ -----------------------------------------
|
||||
* 18-Mar-12 Vishal Gupta Intial version
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
SET verify OFF
|
||||
|
||||
VARIABLE sql_id VARCHAR2(13)
|
||||
VARIABLE child_number NUMBER
|
||||
|
||||
BEGIN
|
||||
:sql_id := '&&1';
|
||||
:child_number := NULL;
|
||||
END;
|
||||
/
|
||||
|
||||
|
||||
SET long 4000
|
||||
SET longchunksize 4000
|
||||
|
||||
|
||||
SELECT *
|
||||
FROM table(DBMS_XPLAN.display_cursor( sql_id => :sql_id
|
||||
, cursor_child_no => :child_number
|
||||
, format => 'ADVANCED'
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
@@footer
|
||||
Reference in New Issue
Block a user