V$SYSTEM_EVENT、V$SESSION_EVENT、V$SESSION_WAIT&V$session、V$WAITSTAT

1、v$system_event

内容:统计数据,统计instance启动以来每种等待时间的等待次数、时间、平均时间等

目的:用来发现系统级评瓶颈

 SQL> desc v$system_event
 Name                          
 ------------------------
 EVENT                         
 TOTAL_WAITS         --总等待次数
 TOTAL_TIMEOUTS     --等待超时次数           
 TIME_WAITED         --总的等待时间,单位是百分之一秒  (最重要考虑)        
 AVERAGE_WAIT       -- 平均等待时间,总的等待时间/总等待次数           
 TIME_WAITED_MICRO  --总的等待时间的微秒形式 1/1000000    

常见的等待现象:
latch free
enqueue
free buffer waits
buffer busy waits: 查看V$WAITSTAT
db file sequential read
db file scattered read

2、v$session_event(仅比v$system_event多一个sid字段)

内容:每个session所有等待事件的统计信息

目的:用来诊断缓慢原因

3、v$session或v$session_wait(当前session含 active和inactive)正在等待什么,无等待则显示上一次等待信息

 SID: session id
? EVENT: Event the session is currently waiting for, or the last event the session had to wait for
? WAIT_TIME: Time (in hundredths of a second) that the session waited for the event; if the WAIT_TIME is 0, then the session is currently waiting for the event
? SEQ#: Gets incremented with every wait of the session
? P1, P2, P3: Wait event specific details for the wait
? P1TEXT, P2TEXT, P3TEXT: Description of P1,P2,P3 for the given event

WAIT_TIME Meaning                                                   Waiting
>0 Time waited in the last wait (in 10 ms clock ticks)      No
0 Session is currently waiting for this event                    Yes
-1 Time waited in the last wait was less than 10 ms         No
-2 Timing is not enabled                                                No

4、V$WAITSTAT(统计)
目的:a summary all block buffer waits since instance startup。适于查找buffer busy waits

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值