OWI诊断的步骤(基础)

基础知识:

-- 查看目前的给系统等待信息
col wait_class for a20

select e.wait_class#,e.wait_class,sum(s.total_waits),sum(s.time_waited)
from v$event_name e,v$system_event s
where e.name=s.event
group by e.wait_class#,e.wait_class
order by e.wait_class#;

--和以下视图查询出来结果基本相同
select * from v$system_wait_class;

等待事件分类:
IDLE WAIT:可忽略
Application:行锁,表锁,ddl锁
Configuration:由于配置导致
Administrative:特权用户的某些维护操作导致
Concurrency:由于并发量大引起的
Commit:log file sync
Network
User i/o waits:前台进程,smon,nmon
System i/o waits:除了smon,nmon外的后台进程
Scheduler:资源管理引起的
Cluster:RAC
Other


latch等待细分:
col p1 for a20
col p2 for a20
col p3 for a20
set lines 200
select event,p1,p2,p3 from v$session_wait
where event like 'latch%';

-- 查询系统时间消耗模型
col stat_name for a50
set lines 200
select * from v$sys_time_model;


ASH:active session history
这是awr的一部分,从v$session中每秒采样一次, 除去idle事件,除去非active的session。
除了存储在awr中之外,1/10的采样,可以在视图中看到。


重点:OWI诊断的步骤
1. 从系统级开始
--v$system_event
--statspack/awr报告
2、关注存在较大等待时间和次数的事件
3、注意过滤掉idle事件
4、对关键事件进行细致跟踪。
--v$session_wait
--statspack/awr报告

 

posted @ 2013-03-19 10:46  taowang2016  阅读(196)  评论(0编辑  收藏  举报