0
sql_in_ash
emcs
48次下载
536次浏览
2019-07-24
4.5

脚本内容

--特定SQL ASH中的执行情况,简版
 col PLAN_OP for a80
 col event for a32
 break on PLAN_OP,SQL_PLAN_LINE_ID
 select SQL_PLAN_LINE_ID||':'||SQL_PLAN_OPERATION||' '||SQL_PLAN_OPTIONS||' '||object_name PLAN_OP,event,count(*)
from v$active_session_history h,dba_objects o
where sql_id = '&sqlid'
and sample_time > sysdate - 1/24
and CURRENT_OBJ# = object_id
group by event,SQL_PLAN_LINE_ID,SQL_PLAN_OPERATION,SQL_PLAN_OPTIONS,object_name
order by SQL_PLAN_LINE_ID,count(*) desc
/

评论

热门资源
热门脚本
近期活动
全部
暂无活动,敬请期待...
相关课程
全部