40.Oracle杂记——Oracle常用动态视图v$session_wait

  • Post author:
  • Post category:其他



40.Oracle杂记——Oracle常用动态视图v$session_wait

视图v$session_wait显示每个会话当前后最后等待。

视图描述如下:

sys@PDB1> desc v$session_wait;

Name                                                                  Null?    Type

————————————————————- ————————————

SID                                                                           NUMBER

SEQ#                                                                                 NUMBER

EVENT                                                                               VARCHAR2(64)

P1TEXT                                                                 VARCHAR2(64)

P1                                                                             NUMBER

P1RAW                                                                             RAW(8)

P2TEXT                                                                 VARCHAR2(64)

P2                                                                             NUMBER

P2RAW                                                                             RAW(8)

P3TEXT                                                                 VARCHAR2(64)

P3                                                                             NUMBER

P3RAW                                                                             RAW(8)

WAIT_CLASS_ID                                                                     NUMBER

WAIT_CLASS#                                                                          NUMBER

WAIT_CLASS                                                                  VARCHAR2(64)

WAIT_TIME                                                                   NUMBER

SECONDS_IN_WAIT                                                              NUMBER

STATE                                                                               VARCHAR2(19)

WAIT_TIME_MICRO                                                             NUMBER

TIME_REMAINING_MICRO                                                          NUMBER

TIME_SINCE_LAST_WAIT_MICRO                                             NUMBER

CON_ID                                                                           NUMBER

各个列的描述如下:

SID:会话ID

SEQ#:当前或上次等待的数量

EVENT:会话等待的资源或事件

P1TEXT:第一个等待事件参数的描述

P1:第一个等待事件参数(十进制)

P1RAW:第一个等待事件参数(十六进制)

P2TEXT:第2个等待事件参数的描述

P2:第2个等待事件参数(十进制)

P2RAW:第2个等待事件参数(十六进制)

P3TEXT:第3个等待事件参数的描述

P3:第3个等待事件参数(十进制)

P3RAW:第3个等待事件参数(十六进制)

WAIT_CLASS_ID:等待事件类ID

WAIT_CLASS#:等待事件类号

WAIT_CLASS   :等待事件类名字

WAIT_TIME:如果会话正在等待,那么值为0,如果会话不在等待,那么值为>0,-1,-2.

SECONDS_IN_WAIT:如果会话正在等待,这个值是总计

STATE:等待状态

WAIT_TIME_MICRO:等待时间的总计。如果会话在正在等待,那么值就是当前等待花费的时间,如果会话不在等待,那么这个值就是上次等待时间总和

TIME_REMAINING_MICRO:有4个值,>0,0,-1,NULL. >0 当前等待需要的时间,0 等待超时,-1 当前等待无限期,NULL会话没有在等待

TIME_SINCE_LAST_WAIT_MICRO  :上次等待结束后流逝的时间

CON_ID :容器ID



版权声明:本文为notbaron原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。