Last active
December 24, 2015 13:59
-
-
Save sytkov/6809272 to your computer and use it in GitHub Desktop.
dbms_xplan.display_cursor call example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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