DEFINE W_ADDRESS=54B4DF20 -- ここに対象SQLのADDRESS値を指定
DEFINE W_HASH_VALUE=1273901568 -- ここに対象SQLのHASH_VALUE値を指定
SELECT id,
lpad (' ', depth) || operation operation,
options,
object_name,
optimizer,
cost
FROM v$sql_plan
WHERE hash_value=&W_HASH_VALUE
AND address='&W_ADDRESS'
START WITH id = 0
CONNECT BY
(PRIOR id=parent_id
AND PRIOR hash_value=hash_value
AND PRIOR child_number=child_number)
ORDER SIBLINGS BY id, position;
ID OPERATION OPTIONS OBJECT_NAME OPTIMIZE COST
---- -------------------- --------------- ------------------------------ -------- ----------
0 SELECT STATEMENT CHOOSE
1 SORT GROUP BY
2 TABLE ACCESS FULL LINEITEM