Note
This view is available starting with V1.4.
Purpose
The GV$SESSION_WAIT_HISTORY view displays the information about the most recent 10 wait events for all sessions on all nodes.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| SID | bigint(20) | NO | For V4.3.x:
|
| CON_ID | bigint(20) | NO | The tenant ID. |
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| SEQ# | bigint(20) | NO | The sequence number of the wait event. |
| EVENT# | bigint(20) | NO | The number of the wait event. |
| EVENT | varchar(64) | NO | The name of the wait event. |
| P1TEXT | varchar(64) | NO | The description of parameter 1 of the wait event. |
| P1 | bigint(20) unsigned | NO | The value of parameter 1 of the wait event. |
| P2TEXT | varchar(64) | NO | The description of parameter 2 of the wait event. |
| P2 | bigint(20) unsigned | NO | The value of parameter 2 of the wait event. |
| P3TEXT | varchar(64) | NO | The description of parameter 3 of the wait event. |
| P3 | bigint(20) unsigned | NO | The value of parameter 3 of the wait event. |
| WAIT_TIME | double | NO | The wait time of the wait event, in hundredths of a second. |
| WAIT_TIME_MICRO | bigint(20) | NO | The wait time of the wait event, in microseconds. |
| TIME_SINCE_LAST_WAIT_MICRO | bigint(20) | NO | The time elapsed since the last wait event ended, in microseconds. |
Sample query
Query the information about the most recent 10 wait events for all sessions on all nodes.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$SESSION_WAIT_HISTORY LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
SID: 1152921504606863376
CON_ID: 1002
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: 174572167741.8794
WAIT_TIME_MICRO: 1745721677418794
TIME_SINCE_LAST_WAIT_MICRO: 0
