How to find a databases busy hour
I've run this statement:
set linesize 160 
	
col number_of_events format 999999 
	
col avg_wait_pr_ev format 9999999 
	
col timeslot format a16 
	
select count(event) number_of_events, sum(wait_time+time_waited) wait_tid, sum(wait_time+time_waited)/count(event) avg_wait_pr_ev, to_char(sample_time, 'YYYY-MM-DD HH24') timeslot 
	
from v$active_session_history ash 
	
where sample_time > (sysdate-1) 
	
group by to_char(sample_time, 'YYYY-MM-DD HH24') 
	
order by 4; 
	
But i'm not shure what to look at. Is it the time when there's most events, the time when wait time is on top, or is it when I have most waits pr event? If there is alot of events, but the wait time pr event is small, the impact is maybe not that bad. But if we have few events where the wait time pr event is huge, those events maybe very bad. Does anybody have any experience on this?