session檢視中wait_time

darren__chan發表於2020-05-13
V$SESSION


WAIT_TIME
NUMBER
If the session is currently waiting, then the value is 0 . If the session is not in a wait, then the value is as follows:
> 0 - Value is the duration of the last wait in hundredths of a second
-1 - Duration of the last wait was less than a hundredth of a second
-2 - Parameter TIMED_STATISTICS was set to false
This column has been deprecated in favor of the columns WAIT_TIME_MICRO and STATE .
1.當會話的state為waiting時,wait_time為0.
2.wait_time 大於0時,指的是從上一次waiting到當前非waiting狀態的間隔時間,單位為1/100秒。
3.wait_time為-1時,指的是從上一次waiting到當前非waiting狀態的間隔時間小於1/100秒。
4.wait_time為-2時,TIMED_STATISTICS 設成了fasle。
V$ACTIVE_SESSION_HISTORY

WAIT_TIME
NUMBER
0 if the session was waiting at the time of sampling
Total wait time for the event for which the session last waited if the session was on the CPU when sampled
Whether or not WAIT_TIME = 0 is what is useful to find the SESSION_STATE at the time of sampling, rather than the actual value of WAIT_TIME itself. Maps to V$SESSION.WAIT_TIME .


1.wait_time為0 ,當在取樣時,會話狀態是waiting。

2.wait_time大於0,當在取樣時,會話狀態是on cpu,這個值便是從往上最後一次狀態為waitting到當前的時間區間。
3.這裡的取樣頻率是1s.
DBA_HIST_ACTIVE_SESS_HISTORY


WAIT_TIME
NUMBER

Total wait time (in microseconds) for the event for which the session last waited ( 0 if currently waiting)
1.wait_time為0 ,當在取樣時,會話狀態是waiting。
2.wait_time大於0,當在取樣時,會話狀態是on cpu,這個值便是從往上最後一次狀態為waitting到當前的時間區間。
3.這裡的取樣頻率是10s.


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29863023/viewspace-2691683/,如需轉載,請註明出處,否則將追究法律責任。

相關文章