set lines 132
set pages 1400
accept v_address prompt ‘Enter ADDRESS :’
accept v_hash_value prompt ‘Enter HASH VALUE :’
select sql_text from v$sqltext
where address=’&v_address’
and hash_value=’&v_hash_value’
order by piece;
SELECT LPAD(‘ ‘,2*(LEVEL-1))||operation||’ ‘||options ||’ ‘||object_name ||’ ‘|| DECODE(id, 0, ‘Cost = ‘||position)
“Query Plan”
FROM v$sql_plan
START WITH id = 0 and address=’&v_address’ and hash_value=’&v_hash_value’ and child_number=0
CONNECT BY PRIOR id = parent_id and address=’&v_address’ and hash_value=’&v_hash_value’ and child_number=0;