Note
- For V4.3.x, this view is available starting with V4.3.5.
- For V4.2.x, this view is available starting with V4.2.2.
Purpose
The CDB_WR_EVENT_NAME view displays the names of tenant-level wait events after they are persisted for all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant. |
| CLUSTER_ID | bigint(20) | NO | The ID of the cluster. |
| EVENT_ID | bigint(20) | NO | The ID of the wait event. |
| EVENT_NAME | varchar(64) | YES | The name of the wait event. |
| PARAMETER1 | varchar(64) | YES | The name of the first parameter of the wait event. |
| PARAMETER2 | varchar(64) | YES | The name of the second parameter of the wait event. |
| PARAMETER3 | varchar(64) | YES | The name of the third parameter of the wait event. |
| WAIT_CLASS_ID | bigint(20) | YES | The ID of the class to which the wait event belongs. |
| WAIT_CLASS | varchar(64) | YES | The name of the class to which the wait event belongs. |
The values in the WAIT_CLASS column of this view indicate the type of the wait event and the corresponding wait event ID. The following table describes the values.
| Wait event class name | Wait event ID | Description |
|---|---|---|
| OTHER | 100 | The wait event does not belong to any other class. |
| APPLICATION | 101 | The wait event is caused by client code. |
| CONFIGURATION | 102 | The wait event is caused by insufficient database or instance resources. |
| ADMINISTRATIVE | 103 | The wait event is caused by a database administrator command. |
| CONCURRENCY | 104 | The wait event is caused by waiting for internal database resources. |
| COMMIT | 105 | The wait event is related to log commit. |
| IDLE | 106 | The wait event is caused by an inactive session waiting for a task. |
| NETWORK | 107 | The wait event is related to network communication. |
| USER_IO | 108 | The wait event is caused by waiting for user I/O. |
| SYSTEM_IO | 109 | The wait event is caused by waiting for background process I/O. |
| CLUSTER | 111 | The wait event is related to a cluster. |
Sample query
Query the names of tenant-level wait events after they are persisted for tenant 1004 and display 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