V$system_event中Wait事件的一段话和resources_wait.sql
来源:互联网 发布:重庆理工大学网络 编辑:程序博客网 时间:2024/05/21 10:39
V$SYSTEM_EVENT shows the total number of waits and timeouts, and the total
waiting time recorded for each type of event, accumulated for all processes over
the life of the instance. It is normal to order the events waited for in descending
order of the total time waited, as an indicator of the potential severity of each
type of wait.
However, the total time waited is really only meaningful for those that indicate
waiting for resources. If processes have been waiting because they have no work
to do, then the time waited is immaterial. If they have been waiting for routine
operations, such as disk I/O, then the total time waited will depend on the
workload. In such cases, the average time waited is much more interesting than
the total time waited.
This classification of wait types into idle waits, routine waits, and resource waits
is vital to a correct understanding of the wait statistics. Accordingly, APT has
separate scripts for resource waits and routine waits, and ignores idle waits
altogether. The routine_waits.sql script shows only the average time waited for
each type of routine wait. The resource_waits.sql script (see Example 2.1) shows
the types of resources waited for in descending order of the total time waited, but
also shows the average time waited.
resources_wait.sql:
waiting time recorded for each type of event, accumulated for all processes over
the life of the instance. It is normal to order the events waited for in descending
order of the total time waited, as an indicator of the potential severity of each
type of wait.
However, the total time waited is really only meaningful for those that indicate
waiting for resources. If processes have been waiting because they have no work
to do, then the time waited is immaterial. If they have been waiting for routine
operations, such as disk I/O, then the total time waited will depend on the
workload. In such cases, the average time waited is much more interesting than
the total time waited.
This classification of wait types into idle waits, routine waits, and resource waits
is vital to a correct understanding of the wait statistics. Accordingly, APT has
separate scripts for resource waits and routine waits, and ignores idle waits
altogether. The routine_waits.sql script shows only the average time waited for
each type of routine wait. The resource_waits.sql script (see Example 2.1) shows
the types of resources waited for in descending order of the total time waited, but
also shows the average time waited.
resources_wait.sql:
----------------------------------------------------------------------------------- Script:resource_waits.sql-- Purpose:to show the total waiting time for resource types---- Copyright:(c) 1998 Ixora Pty Ltd-- Author:Steve Adams---------------------------------------------------------------------------------@reset_sqlpluscolumn average_wait format 9999990.00select substr(e.event, 1, 40) event, e.time_waited, e.time_waited / ( e.total_waits - decode(e.event, 'latch free', 0, e.total_timeouts) ) average_waitfrom sys.v_$system_event e, sys.v_$instance iwhere e.event = 'buffer busy waits' or e.event = 'enqueue' or e.event = 'free buffer waits' or e.event = 'global cache freelist wait' or e.event = 'latch free' or e.event = 'log buffer space' or e.event = 'parallel query qref latch' or e.event = 'pipe put' or e.event = 'write complete waits' or e.event like 'library cache%' or e.event like 'log file switch%' or ( e.event = 'row cache lock' and i.parallel = 'NO' )union allselect 'non-routine log file syncs', round(e.average_wait * greatest(e.total_waits - s.value, 0)), e.average_waitfrom sys.v_$system_event e, sys.v_$sysstat swhere e.event = 'log file sync' and s.name = 'user commits'order by 2 desc/@reset_sqlplus其中和reset_sqlplus是:----------------------------------------------------------------------------------- Script:reset_sqlplus.sql-- Purpose:to reset sqlplus settings---- Copyright:(c) 1998 Ixora Pty Ltd-- Author:Steve Adams---------------------------------------------------------------------------------clear breaksclear columnsclear computesset feedback offset verify off资料来源:Oracle8i Internal Services
- V$system_event中Wait事件的一段话和resources_wait.sql
- V$system_event中Wait事件的一段话和resources_wait.sql
- Oracle试图--v$system_event
- Oracle OWI 等待事件视图(v$session_wait/v$session_event/v$system_event)
- [Oracle]OWI等待事件视图(v$session_wait/v$session_event/v$system_event)
- 通过v$session和v$session_wait_class,v$system_event,v$event_histogram来确定锁等待
- 最常用的性能视图——v$system_event、v$session_event(3)!
- V$SYSTEM_EVENT、V$SESSION_EVENT、V$SESSION_WAIT&V$session、V$WAITSTAT
- v$sqlarea,v$sql,v$sqltext的区别和联系
- OWI Components(1):V$SYSTEM_EVENT
- Oracle V$SYSTEM_EVENT字段等解释
- 一段程序阐述下wait和notify
- Oracle9i中v$sql、v$sqlarea、v$sqltext、v$sql_plan的联系与区别
- V$SESSION_WAIT和V$SESSION_EVENT和Wait Events描述
- v$sql和v$sqlarea
- v$sql视图和v$sqlarea视图的构建
- v$sql和v$sqlarea视图的区别
- Effective java 中关于性能和架构的一段话
- eclipse 3.0.1汉化过程
- RO。。
- 博弈论和对策行为
- Linux下常用配置文件及常用命令的介绍
- 五子棋算法设计随想
- V$system_event中Wait事件的一段话和resources_wait.sql
- Linux启动及控制服务进程
- Redhat Linux下常用服务介绍
- 个人简历1
- 利用Samba配置文件共享服务
- 配置Apache及运行perl,php
- MBA课程《应用博弈论》案例
- JavaBeans
- Linux下安装Tomcat及融合Apache