Note
This view is introduced since OceanBase Database V1.4.
Purpose
The V$SYSTEM_EVENT view displays the tenant-level wait events.
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 where the information is stored. |
| SVR_PORT | bigint(20) | NO | The port number of the OBServer node 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 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. |
| TOTAL_WAITS | bigint(20) | NO | The total number of waits for the event. |
| TOTAL_TIMEOUTS | bigint(20) | NO | The total number of timeouts for the event. |
| TIME_WAITED | double | NO | The total wait time for the event, in hundredths of a second. |
| AVERAGE_WAIT | double | NO | The average wait time for the event, in hundredths of a second. |
| TIME_WAITED_MICRO | bigint(20) | NO | The total wait time for the event, in microseconds. |
Sample query
In the sys tenant, view all wait events for 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
View the current or previous wait events for all sessions:
View all wait events for each session:
View the definitions of all wait events for a tenant: V$EVENT_NAME
For more information about wait events, see Common wait events.