Note
This view is introduced since OceanBase Database V1.4.
Purpose
The V$SESSION_WAIT_HISTORY view displays the latest 10 wait events of all sessions on the current OBServer node.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SID | NUMBER | NO | For V4.3.x:
|
| CON_ID | NUMBER | NO | The ID of the tenant. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | NUMBER(38) | NO | The port number of the OBServer node. |
| SEQ# | NUMBER | NO | The sequence number of the wait event. |
| EVENT# | NUMBER | NO | The number of the wait event. |
| EVENT | VARCHAR2(64) | NO | The name of the wait event. |
| P1TEXT | VARCHAR2(64) | NO | The description of the first parameter of the wait event. |
| P1 | NUMBER | NO | The value of the first parameter of the wait event. |
| P2TEXT | VARCHAR2(64) | NO | The description of the second parameter of the wait event. |
| P2 | NUMBER | NO | The value of the second parameter of the wait event. |
| P3TEXT | VARCHAR2(64) | NO | The description of the third parameter of the wait event. |
| P3 | NUMBER | NO | The value of the third parameter of the wait event. |
| WAIT_TIME_MICRO | NUMBER | NO | The wait time of the wait event, in microseconds. |
| TIME_SINCE_LAST_WAIT_MICRO | NUMBER | NO | The amount of time in microseconds elapsed from the end of the last wait to the current wait. |
| WAIT_TIME | NUMBER | NO | The wait time of the wait event, in hundredths of a second. |
Sample query
Query information about the most recent 10 wait events for all sessions on the current node.
obclient [SYS]> SELECT * FROM SYS.V$SESSION_WAIT_HISTORY 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
SEQ#: 1
EVENT#: 0
EVENT: NULL
P1TEXT: NULL
P1: 0
P2TEXT: NULL
P2: 0
P3TEXT: NULL
P3: 0
WAIT_TIME: 174572432901.50381
WAIT_TIME_MICRO: 1745724329015038
TIME_SINCE_LAST_WAIT_MICRO: 0