OWI的等待事件的簡單收集
-- Assumption is that you have TOOLS tablespace in your database.
-- Create Begin and End tables to store V$SYSTEM_EVENT contents for
-- time T1 and T2 to compute delta.
-- ===================================--
You only need to create these tables once.
-- ===================================
create table begin_system_event tablespace tools
as select * from v$system_event where 1=2;
create table end_system_event tablespace tools
as select * from v$system_event where 1=2;
-- Take a snapshot of V$SYSTEM_EVENT information at time T1
truncate table begin_system_event;
insert into begin_system_event select * from v$system_event;
-- Wait n seconds or n minutes, and then take another snapshot-- of V$SYSTEM_EVENT at time T2
truncate table end_system_event;
insert into end_system_event select * from v$system_event;
-- Report the ‘delta’ numbers for wait events between times T2 and T1
SELECT t1.event, (t2.total_waits - nvl(t1.total_waits, 0)) "Delta_Waits", (
t2.total_timeouts -
nvl(t1.total_timeouts, 0)
) "Delta_Timeouts", (t2.time_waited - nvl(t1.time_waited, 0)) "Delta_Time_Waited"
FROM begin_system_event t1, end_system_event t2where t2.event = t1.event(+)
order by (t2.time
-- Create Begin and End tables to store V$SYSTEM_EVENT contents for
-- time T1 and T2 to compute delta.
-- ===================================--
You only need to create these tables once.
-- ===================================
create table begin_system_event tablespace tools
as select * from v$system_event where 1=2;
create table end_system_event tablespace tools
as select * from v$system_event where 1=2;
-- Take a snapshot of V$SYSTEM_EVENT information at time T1
truncate table begin_system_event;
insert into begin_system_event select * from v$system_event;
-- Wait n seconds or n minutes, and then take another snapshot-- of V$SYSTEM_EVENT at time T2
truncate table end_system_event;
insert into end_system_event select * from v$system_event;
-- Report the ‘delta’ numbers for wait events between times T2 and T1
SELECT t1.event, (t2.total_waits - nvl(t1.total_waits, 0)) "Delta_Waits", (
t2.total_timeouts -
nvl(t1.total_timeouts, 0)
) "Delta_Timeouts", (t2.time_waited - nvl(t1.time_waited, 0)) "Delta_Time_Waited"
FROM begin_system_event t1, end_system_event t2where t2.event = t1.event(+)
order by (t2.time
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-82820/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- owI 事件的收集事件
- Oracle的等待事件Oracle事件
- 收集統計資訊的簡單操作
- OWI --用 stored procedure 收集session wait 資訊SessionAI
- 網路上的等待事件事件
- RAC中的等待事件事件
- ORACLE中的等待事件Oracle事件
- 【等待事件之二】log 相關的等待事件
- 【等待事件】ORACLE常見等待事件事件Oracle
- 【等待事件】等待事件系列(5.1)--Enqueue(佇列等待)事件ENQ佇列
- 簡單事件事件
- Oracle等待事件的種類Oracle事件
- 兩個重要的等待事件!事件
- 常見的oraclet等待事件Oracle事件
- Oracle 常見的等待事件Oracle事件
- 等待事件事件
- form表單的onSubmit事件簡單介紹ORMMIT事件
- oracle的一些等待事件Oracle事件
- 【指令碼】快速排除空閒等待事件得到敏感的非空閒等待事件指令碼事件
- Solidity事件,等待事件Solid事件
- 【TUNE_ORACLE】等待事件之等待事件類別Oracle事件
- 等待事件分析事件
- oracle等待事件Oracle事件
- Oracle 等待事件Oracle事件
- px等待事件事件
- 等待事件 二事件
- java關於事件的簡單介紹Java事件
- 【等待事件】等待事件系列(1)--User I/O型別事件型別
- 【效能調整】等待事件(三) 常見等待事件(一)事件
- 【效能調整】等待事件(四) 常見等待事件(二)事件
- oracle常見的等待事件說明Oracle事件
- Oracle 常見的33個等待事件Oracle事件
- 未提交事務造成的等待事件事件
- Oracle-監控oracle的等待事件Oracle事件
- 基於等待事件的效能診斷事件
- 10g中的transaction等待事件事件
- statspack中報告中的等待事件事件
- 【效能調整】等待事件(十) 10g中的latch等待事件