Note
This view is available starting with V1.4.
Purpose
This view displays the waiting events of each tenant on the current OBServer node, and the total number of occurrences, waiting time, timeout count, and other statistics of each type of waiting 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 waiting event. |
| EVENT | varchar(64) | NO | The description of the waiting event. |
| WAIT_CLASS_ID | bigint(20) | NO | The ID of the class to which the waiting event belongs. |
| WAIT_CLASS# | bigint(20) | NO | The index of the class to which the waiting event belongs. |
| WAIT_CLASS | varchar(64) | NO | The class to which the waiting event belongs. |
| TOTAL_WAITS | bigint(20) | NO | The total number of waiting events. |
| TOTAL_TIMEOUTS | bigint(20) | NO | The total number of timeouts. |
| TIME_WAITED | double | NO | The total waiting time of the waiting event, in 10 ms. |
| AVERAGE_WAIT | double | NO | The average waiting time of the waiting event, in 10 ms. |
| TIME_WAITED_MICRO | bigint(20) | NO | The total waiting time of the waiting event, in microseconds. |
Sample query
In the sys tenant, query all waiting events of all tenants 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 |
+--------+----------------+----------+----------+-------------------------------------+---------------+-------------+---------------+-------------+----------------+-------------+----------------------+-------------------+
| 1 | 11.xxx.xxx.xxx | 28825 | 10001 | db file data read | 108 | 8 | USER_IO | 1062255 | 0 | 13525.925 | 0.01273321848332086 | 135259250 |
| 1 | 11.xxx.xxx.xxx | 28825 | 11001 | db file compact read | 109 | 9 | SYSTEM_IO | 1412366 | 0 | 56152.2317 | 0.03975756404501383 | 561522317 |
| 1 | 11.xxx.xxx.xxx | 28825 | 11002 | db file compact write | 109 | 9 | SYSTEM_IO | 311353 | 0 | 17540.5111 | 0.05633641268913419 | 175405111 |
| 1 | 11.xxx.xxx.xxx | 28825 | 11016 | palf read | 109 | 9 | SYSTEM_IO | 914 | 0 | 29.6847 | 0.03247778993435448 | 296847 |
| 1 | 11.xxx.xxx.xxx | 28825 | 11017 | palf write | 109 | 9 | SYSTEM_IO | 9706706 | 0 | 239668.5615 | 0.024691029222477737 | 2396685615 |
| 1 | 11.xxx.xxx.xxx | 28825 | 13000 | sync rpc | 107 | 7 | NETWORK | 908785 | 0 | 53998.3223 | 0.059418148737050015 | 539983223 |
| 1 | 11.xxx.xxx.xxx | 28825 | 13001 | mysql response wait client | 106 | 6 | IDLE | 5324 | 0 | 73.8805 | 0.013876878287002254 | 738805 |
| 1 | 11.xxx.xxx.xxx | 28825 | 13003 | external table wait remote response | 107 | 7 | NETWORK | 1 | 0 | 0.0137 | 0.0137 | 137 |
| 1 | 11.xxx.xxx.xxx | 28825 | 13004 | wait in request queue | 102 | 2 | CONFIGURATION | 6159353 | 0 | 14228.6415 | 0.002310087033491992 | 142286415 |
| 1 | 11.xxx.xxx.xxx | 28825 | 15101 | default condition wait | 104 | 4 | CONCURRENCY | 5743569 | 0 | 219216.8729 | 0.03816736125221095 | 2192168729 |
+--------+----------------+----------+----------+-------------------------------------+---------------+-------------+---------------+-------------+----------------+-------------+----------------------+-------------------+
10 rows in set
References
Query the current or previous waiting events of all sessions:
Query all waiting events at the session level:
Query the definitions of all waiting events of a tenant: V$EVENT_NAME
For more information about waiting events, see Common waiting events.
