Created
November 3, 2018 01:52
-
-
Save xtender/e771daf5581a12db15e3708c54678f5b to your computer and use it in GitHub Desktop.
ash_full_scans.sql
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 | |
h.sql_id | |
,h.SQL_PLAN_OPERATION | |
,h.SQL_PLAN_OPTIONS | |
,p.object_owner||'.'||p.OBJECT_NAME object_name | |
,count(*) | |
from v$active_session_history h,v$sql_plan p | |
where h.IN_SQL_EXECUTION='Y' | |
and h.sql_plan_operation in ('INDEX','TABLE ACCESS') | |
and p.object_name is not null | |
and p.object_owner!='SYS' | |
and p.SQL_ID = h.sql_id | |
and p.CHILD_NUMBER = h.SQL_CHILD_NUMBER | |
and p.ID = h.SQL_PLAN_LINE_ID | |
and h.sql_plan_options like '%FULL%' | |
group by | |
h.sql_id | |
,h.SQL_PLAN_OPERATION | |
,h.SQL_PLAN_OPTIONS | |
,p.object_owner||'.'||p.OBJECT_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment