Note
This view is available starting with V1.4.
Purpose
The V$SESSION_EVENT view displays the wait events of each session.
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 maximum 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 the wait events of each session.
obclient [oceanbase]> SELECT * FROM oceanbase.V$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
