Historical Wait Events
select s.start_time,
instance_number||':'||event_name,
sum(nvl(total_waits,0)),
sum(nvl(TIME_WAITED_MICRO,0))
from
(select snap_id,
instance_number,
event_name,
total_waits,
time_waited_micro
from dba_hist_system_event) x,
(select snap_id,
max(to_char((trunc(begin_interval_time, 'mi')),'DD-MON-YYYY HH24:MI')) as start_time,
max(to_char((trunc(end_interval_time, 'mi')),'DD-MON-YYYY HH24:MI')) as end_time
from dba_hist_snapshot
where begin_interval_time >= sysdate -1
group by snap_id
) s
where s.snap_id = x.snap_id
group by s.snap_id,s.start_time,
instance_number||':'||event_name
order by s.snap_id
Download Speedway to graphically plot the above script results.