Skip to content

Instantly share code, notes, and snippets.

@rdp
Created April 1, 2015 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdp/5727641c4912b51f3721 to your computer and use it in GitHub Desktop.
Save rdp/5727641c4912b51f3721 to your computer and use it in GitHub Desktop.
SELECT LPAD(' ', 2 * (level - 1)) ||
DECODE (level,1,NULL,level-1 || '.' || pt.position || ' ') ||
INITCAP(pt.operation) ||
DECODE(pt.options,NULL,'',' (' || INITCAP(pt.options) || ')') plan,
pt.object_name,
pt.object_type,
pt.bytes,
pt.cost,
pt.partition_start,
pt.partition_stop
FROM plan_table pt
START WITH pt.id = 0
AND pt.statement_id = 'TIM'
CONNECT BY PRIOR pt.id = pt.parent_id
AND pt.statement_id = 'TIM';
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment