Note
This view is available starting with V1.4.
Purpose
This view displays the wait events of the current tenant on the current OBServer node, and statistics such as the number of occurrences, wait time, and timeout count for each type of wait event.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | The tenant ID. |
| SVR_IP | varchar(46) | NO | The IP address of the server where the information is stored. |
| SVR_PORT | bigint(20) | NO | The port number of the server where the information is stored. |
| EVENT_ID | bigint(20) | NO | The ID of the wait event. |
| EVENT | varchar(64) | NO | The description 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 index of the class to which the wait event belongs. |
| WAIT_CLASS | varchar(64) | NO | The class to which the wait event belongs. |
| TOTAL_WAITS | bigint(20) | NO | The total number of wait events. |
| TOTAL_TIMEOUTS | bigint(20) | NO | The total number of timeouts. |
| TIME_WAITED | double | NO | The total wait time of the wait event, in 10 ms. |
| AVERAGE_WAIT | double | NO | The average wait time of the wait event, in 10 ms. |
| TIME_WAITED_MICRO | bigint(20) | NO | The total wait time of the wait event, in microseconds. |
Sample query
Query all wait events of the current tenant on the current node, and display the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.V$SYSTEM_EVENT LIMIT 10;
The query result is as follows:
+--------+----------------+----------+----------+----------------------------+---------------+-------------+---------------+-------------+----------------+-------------+----------------------+-------------------+
| CON_ID | SVR_IP | SVR_PORT | EVENT_ID | EVENT | WAIT_CLASS_ID | WAIT_CLASS# | WAIT_CLASS | TOTAL_WAITS | TOTAL_TIMEOUTS | TIME_WAITED | AVERAGE_WAIT | TIME_WAITED_MICRO |
+--------+----------------+----------+----------+----------------------------+---------------+-------------+---------------+-------------+----------------+-------------+----------------------+-------------------+
| 1002 | 11.xxx.xxx.xxx | 28825 | 10001 | db file data read | 108 | 8 | USER_IO | 6466 | 0 | 248.8259 | 0.038482199195793376 | 2488259 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 11001 | db file compact read | 109 | 9 | SYSTEM_IO | 480081 | 0 | 30589.1178 | 0.06371657657770252 | 305891178 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 11002 | db file compact write | 109 | 9 | SYSTEM_IO | 2426062 | 0 | 63913.4377 | 0.026344519513516143 | 639134377 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 11016 | palf read | 109 | 9 | SYSTEM_IO | 541222 | 0 | 8143.9096 | 0.015047262675944438 | 81439096 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 11017 | palf write | 109 | 9 | SYSTEM_IO | 19637686 | 0 | 483846.5034 | 0.024638671959618868 | 4838465034 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 13000 | sync rpc | 107 | 7 | NETWORK | 1533 | 0 | 1351.2232 | 0.88142413568167 | 13512232 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 13001 | mysql response wait client | 106 | 6 | IDLE | 20 | 0 | 0.037 | 0.00185 | 370 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 13004 | wait in request queue | 102 | 2 | CONFIGURATION | 11518452 | 0 | 26999.07 | 0.002343984243716083 | 269990700 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 15101 | default condition wait | 104 | 4 | CONCURRENCY | 5465549 | 0 | 206549.5945 | 0.03779118886318648 | 2065495945 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 15102 | sleep wait | 106 | 6 | IDLE | 103 | 0 | 1023.8728 | 9.940512621359224 | 10238728 |
+--------+----------------+----------+----------+----------------------------+---------------+-------------+---------------+-------------+----------------+-------------+----------------------+-------------------+
10 rows in set
References
Query the current or previous wait events of all sessions:
Query all wait events at the session level:
Query the definitions of all wait events of the tenant: V$EVENT_NAME
For more information about wait events, see Common wait events.
