Note
This view is available starting with V1.4.
Purpose
This view displays the details of the current or last waiting event for all sessions in the current tenant on the current OBServer node, including the event name and wait time.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SID | NUMBER | NO | For V4.2.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 waiting event |
| P1TEXT | VARCHAR2(64) | NO | Description of the first parameter of the waiting event |
| P1 | NUMBER | NO | Value of the first parameter of the waiting event |
| P2TEXT | VARCHAR2(64) | NO | Description of the second parameter of the waiting event |
| P2 | NUMBER | NO | Value of the second parameter of the waiting event |
| P3TEXT | VARCHAR2(64) | NO | Description of the third parameter of the waiting event |
| P3 | NUMBER(38) | NO | Value of the third parameter of the waiting event |
| WAIT_CLASS_ID | NUMBER | NO | ID of the waiting event category |
| WAIT_CLASS# | NUMBER | NO | Sequence number of the waiting event category |
| WAIT_CLASS | VARCHAR2(64) | NO | Name of the waiting event category |
| STATE | VARCHAR2(19) | NO | Current state of the waiting event. Valid values: |
| WAIT_TIME_MICRO | NUMBER | NO | Waiting time, in microseconds. If the session is currently waiting, this column indicates the time that the session has been waiting. If the session is not currently waiting, this column indicates the total waiting time of the last wait. |
| TIME_REMAINING_MICRO | NUMBER | NO | |
| TIME_SINCE_LAST_WAIT_MICRO | NUMBER | NO | Time from the end of the last wait to the current time, in microseconds. If the session is currently waiting, this column is 0. |
Sample query
Query the details of the current or last waiting event for all sessions in the current tenant on the current node, and display the first two records.
obclient [SYS]> SELECT * FROM SYS.V$SESSION_WAIT WHERE ROWNUM <=2\G
The query result is as follows:
*************************** 1. row ***************************
SID: 3221561745
CON_ID: 1004
SVR_IP: 11.xxx.xxx.xxx
SVR_PORT: 28825
EVENT: exec inner sql wait
P1TEXT: wait inner sql class
P1: 0
P2TEXT: inner session id
P2: 9223372037041507577
P3TEXT: NULL
P3: 0
WAIT_CLASS_ID: 100
WAIT_CLASS#: 0
WAIT_CLASS: OTHER
STATE: WAITED SHORT TIME
WAIT_TIME_MICRO: 856
TIME_REMAINING_MICRO: -1
TIME_SINCE_LAST_WAIT_MICRO: -98899315458255036
*************************** 2. row ***************************
SID: -9223372036854723648
CON_ID: 1004
SVR_IP: 11.xxx.xxx.xxx
SVR_PORT: 28825
EVENT: latch: palf handle impl lock wait
P1TEXT: address
P1: 139727583928432
P2TEXT: number
P2: 1074026206
P3TEXT: tries
P3: 17
WAIT_CLASS_ID: 104
WAIT_CLASS#: 4
WAIT_CLASS: CONCURRENCY
STATE: WAITED SHORT TIME
WAIT_TIME_MICRO: 26
TIME_REMAINING_MICRO: NULL
TIME_SINCE_LAST_WAIT_MICRO: -96979327249374521
2 rows in set
References
- For more information about waiting events, see Common waiting events.