2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

31
mhouri/xpgv$.sql Normal file
View File

@@ -0,0 +1,31 @@
SELECT
RPAD('Inst: '||v.inst_id, 9)||' '||RPAD('Child: '||v.child_number, 11) inst_child
,t.plan_table_output
FROM
gv$sql v,
TABLE(DBMS_XPLAN.DISPLAY('gv$sql_plan_statistics_all'
, NULL
, 'ADVANCED ALLSTATS LAST'
, 'inst_id = '||v.inst_id||'
AND sql_id = '''||v.sql_id||''' AND child_number = '||v.child_number
)
) t
WHERE
v.sql_id = '&&sql_id.'
AND v.loaded_versions > 0;
SELECT
t.plan_table_output
FROM
gv$sql v,
TABLE(DBMS_XPLAN.DISPLAY('gv$sql_plan_statistics_all'
, NULL
, 'ADVANCED ALLSTATS LAST'
, 'inst_id = '||v.inst_id||'
AND sql_id = '''||v.sql_id||''' AND child_number = '||v.child_number
)
) t
WHERE
v.sql_id = '&&sql_id.'
AND v.loaded_versions > 0;