Note
This view is available starting with V1.4.
Purpose
The GV$SESSION_EVENT view displays session-level wait events on all servers in the cluster.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| 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. |
| SID | bigint(20) | NO | For V4.3.x:
|
| EVENT | varchar(64) | NO | The description of the wait event. |
| TOTAL_WAITS | bigint(20) | NO | The total number of wait events. |
| TOTAL_TIMEOUTS | bigint(20) | NO | The total number of wait event timeouts. |
| TIME_WAITED | double | NO | The total wait time of the wait events, in hundredths of a second. |
| AVERAGE_WAIT | double | NO | The average wait time of the wait events, in hundredths of a second. |
| MAX_WAIT | double | NO | The longest wait time of the wait events, in hundredths of a second. |
| TIME_WAITED_MICRO | bigint(20) | NO | The total wait time of the wait events, in microseconds. |
| CPU | null | NO | An invalid column. |
| EVENT_ID | bigint(20) | NO | The ID of the wait event. |
| WAIT_CLASS_ID | bigint(20) | NO | The ID of the wait event type. |
| WAIT_CLASS# | bigint(20) | NO | The index of the wait event type. |
| WAIT_CLASS | varchar(64) | NO | The name of the wait event type. |
Sample query
Query session-level wait events on all servers in the cluster.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$SESSION_EVENT LIMIT 1\G
The query result is as follows:
*************************** 1. row ***************************
CON_ID: 1002
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
SID: 1152921504606863376
EVENT: db file data read
TOTAL_WAITS: 5
TOTAL_TIMEOUTS: 0
TIME_WAITED: 0.1023
AVERAGE_WAIT: 0.02046
MAX_WAIT: 0.028
TIME_WAITED_MICRO: 1023
CPU: NULL
EVENT_ID: 10001
WAIT_CLASS_ID: 108
WAIT_CLASS#: 8
WAIT_CLASS: USER_IO
