Oracle

How to analyze wait events in Oracle

User below query to get the top wait classes in Oracle database

sql">Select wait_class, sum(time_waited), sum(time_waited)/sum(total_waits)

Sum_Waits

From v$system_wait_class

Group by wait_class

Order by 3 desc;

From the above query, supply each wait class into below query to get the top wait events in database with respect to particular wait class

sql">Select a.event, a.total_waits, a.time_waited, a.average_wait

From v$system_event a, v$event_name b, v$system_wait_class c

Where a.event_id=b.event_id

And b.wait_class#=c.wait_class#

And c.wait_class = '&Enter_Wait_Class'

order by average_wait desc;




 

READ ALSO
How to display date and time in query output

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.