Note
This view is introduced since OceanBase Database V1.4.
Purpose
The GV$SESSION_EVENT view displays the session-level wait events on all OBServer nodes in a cluster.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | The ID of the tenant. |
| SVR_IP | varchar(46) | NO | The IP address of the OBServer node. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node. |
| 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 waits for the event. |
| TOTAL_TIMEOUTS | bigint(20) | NO | The total number of wait timeouts for the event. |
| TIME_WAITED | double | NO | The total wait time of the wait event, in hundredths of a second. |
| AVERAGE_WAIT | double | NO | The average wait time of the wait event, in hundredths of a second. |
| MAX_WAIT | double | NO | The maximum wait time of the wait event, in hundredths of a second. |
| TIME_WAITED_MICRO | bigint(20) | NO | The total wait time for the event, in microseconds. |
| CPU | null | NO | This column is invalid. |
| EVENT_ID | bigint(20) | NO | The ID of the wait event. |
| WAIT_CLASS_ID | bigint(20) | NO | The ID of the class to which the wait event belongs. |
| WAIT_CLASS# | bigint(20) | NO | The subscript of the class to which the wait event belongs. |
| WAIT_CLASS | varchar(64) | NO | The name of the class to which the wait event belongs. |
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: 1
SVR_IP: xx.xx.xx.xx
SVR_PORT: 2882
SID: 3221608040
EVENT: wait in request queue
TOTAL_WAITS: 3
TOTAL_TIMEOUTS: 0
TIME_WAITED: 0.0045
AVERAGE_WAIT: 0.0015
MAX_WAIT: 0.0017
TIME_WAITED_MICRO: 45
CPU: NULL
EVENT_ID: 13004
WAIT_CLASS_ID: 102
WAIT_CLASS#: 2
WAIT_CLASS: CONFIGURATION