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.
-- 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

目录
相关文章
|
2月前
|
Linux Windows
检测进程内存的活跃程度
检测进程内存的活跃程度
|
2月前
crash —— 获取系统内存使用统计数据
crash —— 获取系统内存使用统计数据
|
6月前
2391. 收集垃圾的最少总时间
【5月更文挑战第6天】 收集垃圾的最少总时间
48 4
|
6月前
|
运维 监控 数据可视化
九、GC收集日志
九、GC收集日志
71 4
九、GC收集日志
|
SQL Oracle 关系型数据库
Oracle并行和并发收集统计信息
Oracle并行和并发收集统计信息
367 0
|
监控 Oracle 关系型数据库
Oracle:AWR报告收集中断的问题
目前的数据库巡检,主要依赖袋鼠云自研管控平台EasyDB,它可以提供完善的数据库和主机性能/资源信息,并且配备有短信、钉钉、电话等告警;可接入本地或云上实例;注册SaaS版可以体验所有功能,不收取费用 https://easydb.
4145 0
|
Oracle 关系型数据库 数据库