1统计出后台等待事件

select count(*),event from (select *
from dba_hist_active_sess_history
where SAMPLE_TIME between
TO_TIMESTAMP('2020-03-17 18:00:00', 'YYYY-MM-DD HH24:MI:SS') and
TO_TIMESTAMP('2020-03-17 20:00:00', 'YYYY-MM-DD HH24:MI:SS')) group by event order by 1 desc

 

 

 

 

2.统计哪些机器产生等待事件

select program,machine,count(*)
from dba_hist_active_sess_history
where SAMPLE_TIME between
TO_TIMESTAMP('2020-03-17 18:00:00', 'YYYY-MM-DD HH24:MI:SS') and
TO_TIMESTAMP('2020-03-17 20:00:00', 'YYYY-MM-DD HH24:MI:SS')
and event = 'gc buffer busy acquire'
group by program,machine order by 3 desc

 

posted on 2020-03-18 09:44  代码长风  阅读(182)  评论(0编辑  收藏  举报