Overview
The V$SESSION_WAIT_HISTORY view displays the details of all current session wait events on the current node, including the last 10 such events.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| SID | bigint(20) | NO |
|
| CON_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | Server IP Address |
| SVR_PORT | bigint(20) | NO | Server Port |
| SEQ# | bigint(20) | NO | Wait Event Sequence Number |
| EVENT# | bigint(20) | NO | Event Number |
| EVENT | varchar(64) | NO | Event Name |
| P1TEXT | varchar(64) | NO | Description of Parameter 1 for the WAIT FOR EVENT Statement |
| P1 | bigint(20) unsigned | NO | Value of Parameter 1 for the Wait Event |
| P2TEXT | varchar(64) | NO | Description of Parameter 2 for the WAIT FOR EVENT Statement |
| P2 | bigint(20) unsigned | NO | Value of Parameter 2 for the Wait Event |
| P3TEXT | varchar(64) | NO | Description of Parameter 3 for the WAIT FOR EVENT Statement |
| P3 | bigint(20) unsigned | NO | Value of Parameter 3 for the Wait Event |
| WAIT_TIME | double | NO | Wait time for the event, in milliseconds |
| WAIT_TIME_MICRO | bigint(20) | NO | Wait time for the event, in microseconds |
| TIME_SINCE_LAST_WAIT_MICRO | bigint(20) | NO | Time elapsed from the end of the previous wait to the current wait, in microseconds. |
Sample query
Query the details of all current wait events for all sessions on the current node, including the most recent 10 wait events.
obclient [oceanbase]> SELECT * FROM oceanbase.V$SESSION_WAIT_HISTORY LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
SID: 3221608040
CON_ID: 1
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
SEQ#: 1
EVENT#: 0
EVENT:
P1TEXT:
P1: 0
P2TEXT:
P2: 0
P3TEXT:
P3: 0
WAIT_TIME: 174572146997.0574
WAIT_TIME_MICRO: 1745721469970574
TIME_SINCE_LAST_WAIT_MICRO: 0