script--by Steve Adams

OmarChina發表於2007-10-22
-- Script: routine_waits.sql
-- Purpose: to show the average wait time of routine waits[@more@]

-------------------------------------------------------------------------------
--
-- Script: routine_waits.sql
-- Purpose: to show the average wait time of routine waits
--
-- Copyright: (c) 1998 Ixora Pty Ltd
-- Author: Steve Adams
--
-------------------------------------------------------------------------------
@reset_sqlplus

column average_wait format 9999990.00

select
substr(e.event, 1, 40) event,
e.average_wait
from
sys.v_$system_event e,
sys.v_$instance i
where
e.event = 'DFS lock handle' or
e.event = 'rdbms ipc reply' or
e.event like 'SQL*Net%to%' or
e.event like 'db file%' or
e.event like 'direct path%' or
e.event like 'global cache lock % to %' or
e.event like 'global cache lock open %' or
( e.event like 'log file%' and
e.event not like 'log file switch%'
) or
( e.event = 'row cache lock' and
i.parallel = 'YES'
)
/

@reset_sqlplus

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9925929/viewspace-978074/,如需轉載,請註明出處,否則將追究法律責任。

相關文章