List Summed Database Waits
--
-- List Summed Database Waits.
--
 
SET PAUSE on
SET PAUSE 'Press Return to Continue'
SET LINESIZE 300
SET PAGESIZE 60
 
COLUMN event FORMAT A60
COLUMN wait_class FORMAT A20
COLUMN "total wait time" FORMAT 999,999,999
COLUMN "total seconds in wait" FORMAT 999,999,999
COLUMN "num of waits" FORMAT 999,999,999
 
SELECT 
  event,
  wait_class,
  sum(wait_time) as "TOTAL WAIT TIME",
  sum(seconds_in_wait) as "TOTAL SECONDS IN WAIT",
  count(event) as "NUM OF WAITS"
FROM   v$session_wait
GROUP BY (event,wait_class) 
HAVING COUNT(event) > 0 
ORDER BY 4,5
/

Related Scripts

List Database Session Waits

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License