Monday, September 13, 2010

How to find out top 10 wait events on Database?

set lines 145 pages 200

Select * from (SELECT event, total_waits, ROUND(100 * (total_waits / sum_waits),2) pct_waits, time_wait_sec FROM (SELECT event, total_waits, ROUND((time_waited / 100),2) time_wait_sec, total_timeouts, ROUND((average_wait / 100),2) average_wait_sec FROM sys.v_$system_event), (SELECT SUM(total_waits) sum_waits, SUM(total_timeouts) sum_timeouts, SUM(ROUND((time_waited / 100),2)) sum_time_waited FROM sys.v_$system_event) WHERE EVENT NOT IN ('SQL*Net more data from dblink', 'SQL*Net message to dblink', 'SQL*Net message from dblink','SQL*Net more data from client','SQL*Net more data to client','SQL*Net message from client','SQL*Net message to client','rdbms ipc message') ORDER BY 3 DESC) a where ROWNUM < 11;

No comments:

Post a Comment