Overview
The V$SESSION_EVENT view displays the wait events that occur for each session.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | Server IP Address |
| SVR_PORT | bigint(20) | NO | Server Port Number |
| SID | bigint(20) | NO |
|
| EVENT | varchar(64) | NO | Description of the Waiting Event |
| TOTAL_WAITS | bigint(20) | NO | Total Number of Wait Events |
| TOTAL_TIMEOUTS | bigint(20) | NO | Total Wait Timeout Count for Events |
| TIME_WAITED | double | NO | Total Waiting Time for Events, in Hundredths of a Second |
| AVERAGE_WAIT | double | NO | Average Wait Time for Events, in Hundredths of a Second |
| MAX_WAIT | double | NO | Maximum Waiting Time for Events, in Hundredths of a Second |
| TIME_WAITED_MICRO | bigint(20) | NO | Total Waiting Time for Events (Microseconds) |
| CPU | null | NO | Invalid column |
| EVENT_ID | bigint(20) | NO | Wait for Event ID |
| WAIT_CLASS_ID | bigint(20) | NO | ID of the event type to wait for |
| WAIT_CLASS# | bigint(20) | NO | Index of the event type |
| WAIT_CLASS | varchar(64) | NO | Name of the event type being waited for |
Sample query
Query the wait events occurring for 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