Note
This view is available starting with V1.4.
Purpose
The V$SESSION_WAIT view displays information about the current or previous wait events for all sessions on the current node. This includes details such as the wait event name and the duration of the wait.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SID | NUMBER | NO | For V4.3.x versions:
|
| 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. Possible values:
|
| WAIT_TIME_MICRO | NUMBER | NO | Duration of the wait, in microseconds. If the session is currently waiting, this field shows the elapsed time so far. If the session is not currently waiting, it shows the total wait time of the last wait. |
| TIME_REMAINING_MICRO | NUMBER | NO |
|
| TIME_SINCE_LAST_WAIT_MICRO | NUMBER | NO | Duration 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 for all sessions on the current node.
obclient [SYS]> SELECT * FROM SYS.V$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: 5387
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: 14
TIME_REMAINING_MICRO: -1
TIME_SINCE_LAST_WAIT_MICRO: -360953647143855179
