select inst, to_char(tspan,'DD-MON-YY HH24:MI') TimeO,event,sql_id,cnt
from (
select tspan, inst,decode(event,null,'CPU + Wait for CPU',event) event,sql_id, cnt, rank () over ( partition by tspan order by inst, cnt desc ) as rnk
from (
select instance_number inst , trunc(sample_time,'hh24') + (trunc(to_char(sample_time,'mi')/1)*1)/24/60 as tspan ,
--(trunc(to_char(sample_time,'ss')/1)*1)/24/60/60 as tspan,
event, count(*) cnt,sql_id
from dba_hist_active_sess_history
where snap_id = 42264 group by instance_Number , trunc(sample_time,'hh24') + (trunc(to_char(sample_time,'mi')/1)*1)/24/60 ,event,sql_id
--+ (trunc(to_char(sample_time,'ss')/1)*1)/24/60/60
order by tspan ) )
where rnk < 4 order by tspan
Wednesday, May 5, 2021
wait event
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment