Note
For V4.2.x, this view is available starting from V4.2.2.
Overview
The CDB_WR_EVENT_NAME view displays the names of persistent tenant-level wait events for all tenants.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| CLUSTER_ID | bigint(20) | NO | Cluster ID |
| EVENT_ID | bigint(20) | NO | Wait for Event ID |
| EVENT_NAME | varchar(64) | YES | Wait Time Name |
| PARAMETER1 | varchar(64) | YES | Name of the wait time parameter 1 |
| PARAMETER2 | varchar(64) | YES | Name of Wait Time Parameter 2 |
| PARAMETER3 | varchar(64) | YES | Name of the wait time parameter 3 |
| WAIT_CLASS_ID | bigint(20) | YES | ID of the category to which the event belongs |
| WAIT_CLASS | varchar(64) | YES | Category name of the event to be waited for |
The values in the WAIT_CLASS column of the view contain the type name and corresponding event ID of the wait event, as shown in the following table.
Type of the event to be waited for |
Event Number |
Description |
|---|---|---|
| OTHER | 100 | Waiting Events Not Belonging to Other Types |
| APPLICATION | 101 | Wait Events Caused by Client Code |
| CONFIGURATION | 102 | Waiting Events Caused by Insufficient Database or Instance Resource Configuration |
| ADMINISTRATIVE | 103 | Wait events caused by database administrators entering commands |
| CONCURRENCY | 104 | Wait events for internal database resources |
| COMMIT | 105 | Waiting Events Related to Log Commit |
| IDLE | 106 | The session is in an inactive state, waiting for the task's wait event. |
| NETWORK | 107 | Network Communication Related Waiting Events |
| USER_IO | 108 | I/O Waiting Events |
| SYSTEM_IO | 109 | I/O Waiting Event for Background Processes |
| CLUSTER | 111 | Cluster-related wait events |
Sample query
View the names of persistent tenant-level wait events for tenant 1004, displaying the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_WR_EVENT_NAME WHERE TENANT_ID= 1004 LIMIT 10;
The query result is as follows:
+-----------+------------+----------+-----------------------------------+------------+------------+------------+---------------+-------------+
| TENANT_ID | CLUSTER_ID | EVENT_ID | EVENT_NAME | PARAMETER1 | PARAMETER2 | PARAMETER3 | WAIT_CLASS_ID | WAIT_CLASS |
+-----------+------------+----------+-----------------------------------+------------+------------+------------+---------------+-------------+
| 1004 | 10001 | 0 | latch: latch wait queue lock wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 1 | latch: default spin lock wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 2 | latch: default spin rwlock wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 3 | latch: default mutex wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 4 | latch: kv cache bucket latch wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 5 | latch: time wheel task latch wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 7 | latch: election latch wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 8 | latch: trans ctx latch wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 14 | latch: clog reconfirm latch wait | address | number | tries | 104 | CONCURRENCY |
| 1004 | 10001 | 17 | latch: clog task latch wait | address | number | tries | 104 | CONCURRENCY |
+-----------+------------+----------+-----------------------------------+------------+------------+------------+---------------+-------------+
10 rows in set
