Skip to content

Instantly share code, notes, and snippets.

@sytkov
Last active December 24, 2015 13:59
Show Gist options
  • Save sytkov/6809272 to your computer and use it in GitHub Desktop.
Save sytkov/6809272 to your computer and use it in GitHub Desktop.
dbms_xplan.display_cursor call example
select *
from table(
dbms_xplan.display_cursor(
( SELECT max(sql_id) keep (dense_rank first order by last_active_time desc)
FROM V$SQL
WHERE lower(sql_text) LIKE 'select /*+ gather_plan_statistics %'),
'',
'ALLSTATS ADVANCED LAST +PEEKED_BINDS'
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment