v$session_event , v$system_event , v$session_wait
v$session_event , v$session_wait
http://hi.baidu.com/linuxocp/blog/item/daef1013cadf72caa7ef3f15.html
(1)-V$SESSION_WAIT
這是一個尋找效能瓶頸的關鍵檢視。它提供了任何情況下session在資料庫中當前正在等待什麼(如果session當前什麼也沒在做,則顯示它最後的等待事件)。當系統存在效能問題時,本檢視可以做為一個起點指明探尋問題的方向。
V$SESSION_WAIT中,每一個連線到例項的session都對應一條記錄。
v$system_event :
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:
------------------------------------------------------------------------------- -- -- script: resource_waits.sql -- purpose: to show the total waiting time for resource types -- -- copyright: (c) 1998 ixora pty ltd -- author: steve adams -- ------------------------------------------------------------------------------- @reset_sqlplus column average_wait format 9999990.00 select 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_wait from sys.v_$system_event e, sys.v_$instance i where 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 all select 'non-routine log file syncs', round(e.average_wait * greatest(e.total_waits - s.value, 0)), e.average_wait from sys.v_$system_event e, sys.v_$sysstat s where e.event = 'log file sync' and s.name = 'user commits' order by 2 desc / @reset_sqlplus 其中和reset_sqlplus是:[@more@]v------------------------------------------------------------------------------- -- -- script: reset_sqlplus.sql -- purpose: to reset sqlplus settings -- -- copyright: (c) 1998 ixora pty ltd -- author: steve adams -- ------------------------------------------------------------------------------- clear breaks clear columns clear computes set feedback off set verify off資料來源:oracle8i internal services
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/350519/viewspace-1039834/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- v session_wait v session_event v system_eventSessionAI
- 幾個重要檢視(V$SYSTEM_EVENT V$SESSION_EVENT V$SESSION_WAIT)SessionAI
- v$session_wait和v$session_event檢視SessionAI
- (轉):學習Oracle動態效能表-(9)-V$SESSION_WAIT,V$SESSION_EVENTOracleSessionAI
- v$system_event解析
- V$SESSION_WAITSessionAI
- 10.21 V$SESSION_EVENTSession
- Oracle V$SESSION_WAITOracleSessionAI
- 10.25 V$SESSION_WAITSessionAI
- v$session_wait 相關SessionAI
- V$SYSTEM_EVENT等使用詳解
- 查詢等待事件(wait event)相關的SQL - v$session_wait, v$rowcache,v$sqltext事件AISQLSession
- Oracle等待檢視v$session_waitOracleSessionAI
- 學習動態效能表(18)--V$SYSTEM_EVENT
- 關於v$session_wait 表的運用SessionAI
- 學習動態效能表(六)-(2)-V$SESSION_EVENTSession
- 動態檢視學習之v$session_waitSessionAI
- (轉):學習Oracle動態效能表-(20)-V$SYSTEM_EVENTOracle
- V$SQL、V$SQLSTATS、V$SQLAREASQL
- 學習動態效能表(六)-(1)-V$SESSION_WAITSessionAI
- 前端【VUE】02-vue指令【v-html 、v-show、 v-if 、v-else、v-on、v-bind、v-for、v-model】前端VueHTML
- v$sql,v$sqlarea,v$sqltext區別SQL
- v$sesstat,v$mystat,v$statname和v$sysstat檢視簡介
- Oracle動態效能檢視學習筆記(9)_v$system_eventOracle筆記
- vue v-text,v-html,v-once,v-pre,v-cloak的使用VueHTML
- 幾個檢視 v$mystat v$systata v$sessionSession
- vue_o6_v-once、v-html、v-text、v-pre、v-cloak指令的使用VueHTML
- EMQ 文件 V1.0 V2.0 V3.0MQ
- V$sql_text v$sqlarea v$sql 的區別SQL
- v-if和v-show
- v-html 、v-text({{}}) 、v-model的區別HTML
- v$sqlarea,v$sql,v$sqltext的區別和聯絡SQL
- Oracle動態效能檢視學習筆記(10)_v$session_waitOracle筆記SessionAI
- v$transaction事務_v$session會話_v$rollstat_v$rollname關聯測試_概念Session會話
- V$SQL 和V$SQLAREA區別SQL
- v$sysstat和v$sesstat區別
- v$sql v$sqlarea v$sql_shared_cursor及遊標SQL
- v$sqlarea,v$sql,v$sqltext三個檢視的區別SQL