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
View all wait events of the current tenant in the current tenant 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
View the current or last wait event of all sessions:
View all wait events of each session:
View the definitions of all wait events of the tenant: V$EVENT_NAME
For more information about wait events, see Common wait events.