Note
This view is available starting with V1.4.
Purpose
The GV$SESSION_WAIT view displays information about the current or previous wait events of all sessions on all nodes, including the wait event name, wait time, and other parameters.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SID | NUMBER | NO | For V4.3.x:
|
| CON_ID | NUMBER | NO | Tenant ID |
| SVR_IP | VARCHAR2(46) | NO | Server IP address |
| SVR_PORT | NUMBER(38) | NO | Server port |
| EVENT | VARCHAR2(64) | NO | Name of the wait event |
| P1TEXT | VARCHAR2(64) | NO | Description of the first parameter of the wait event |
| P1 | NUMBER | NO | Value of the first parameter of the wait event |
| P2TEXT | VARCHAR2(64) | NO | Description of the second parameter of the wait event |
| P2 | NUMBER | NO | Value of the second parameter of the wait event |
| P3TEXT | VARCHAR2(64) | NO | Description of the third parameter of the wait event |
| P3 | NUMBER(38) | NO | Value of the third parameter of the wait event |
| WAIT_CLASS_ID | NUMBER | NO | ID of the wait event category |
| WAIT_CLASS# | NUMBER | NO | Sequence number of the wait event category |
| WAIT_CLASS | VARCHAR2(64) | NO | Name of the wait event category |
| STATE | VARCHAR2(19) | NO | Current state of the wait event. Valid values:
|
| WAIT_TIME_MICRO | NUMBER | NO | Wait time in microseconds. If the session is currently waiting, this field indicates the elapsed wait time. If the session is not waiting, this field indicates the total wait time of the last wait. |
| TIME_REMAINING_MICRO | NUMBER | NO |
|
| TIME_SINCE_LAST_WAIT_MICRO | NUMBER | NO | Time elapsed since the last wait ended, in microseconds. If the session is currently waiting, this field is 0. |
Sample query
Query information about the current or previous wait events of all sessions on all nodes.
obclient [SYS]> SELECT * FROM SYS.GV$SESSION_WAIT WHERE ROWNUM =1\G
The query result is as follows:
*************************** 1. row ***************************
SID: 1152921504606867748
CON_ID: 1004
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
EVENT: wait in request queue
P1TEXT: pcode
P1: 5386
P2TEXT: level
P2: 0
P3TEXT: priority
P3: 0
WAIT_CLASS_ID: 102
WAIT_CLASS#: 2
WAIT_CLASS: CONFIGURATION
STATE: WAITED SHORT TIME
WAIT_TIME_MICRO: 21
TIME_REMAINING_MICRO: -1
TIME_SINCE_LAST_WAIT_MICRO: -360953114840905368
