-- find hash_value in v$sql
SELECT hash_value, child_number, plan_hash_value, sql_text FROM v$sql
WHERE sql_id='99kxm3uwfj8um'
;
-- use hash value to create outline
EXEC DBMS_OUTLN.CREATE_OUTLINE('3102253907',0,'GCIMS');
-- list the outlines
set long 300
set pagesize 999
set lines 155
column owner format a12
column category format a15
column name format a30
--column sql_text format a70 trunc
column sql_text format a50 wrap
column hints for 99999
break on owner
select category, ol_name name,
-- hash_value,hash_value2,
decode(bitand(flags, 1), 0, 'UNUSED', 1, 'USED') used,
decode(bitand(flags, 4), 0, 'ENABLED', 4, 'DISABLED') enabled,
hintcount hints,
sql_text
from outln.ol$
;
|