Note
- For OceanBase Database V4.3.x, this view was introduced in OceanBase Database V4.3.5.
- For OceanBase Database V4.2.x, this view was introduced in OceanBase Database V4.2.2.
Purpose
The CDB_WR_SYS_TIME_MODEL view displays WR data for all time model statistics of tenants.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| CLUSTER_ID | bigint(20) | NO | Cluster ID |
| TENANT_ID | bigint(20) | NO | Tenant ID |
| SNAP_ID | bigint(20) | NO | Snapshot ID |
| SVR_IP | varchar(46) | NO | Node IP |
| SVR_PORT | bigint(20) | NO | Node port |
| STAT_ID | bigint(20) | NO | Stat ID |
| STAT_NAME | varchar(64) | NO | Stat name |
| VALUE | bigint(20) | NO | Stat value |
The following table describes the statistics and their corresponding IDs in the STAT_NAME column of the view.
| Statistic | Description | Stat ID | Stat type |
|---|---|---|---|
| DB time | The total time of database activities, which is the sum of CPU usage and non-idle wait time. | 200001 | 3072 |
| DB CPU | The time of CPU usage during database activities. | 200002 | 3072 |
| background elapsed time | The total time of background process execution. | 200005 | 3072 |
| background cpu time | The CPU usage of background processes. | 200006 | 3072 |
| non idle wait time | The total time of non-idle waits, which is the total time when the session is in a wait state but not in an idle wait state. | 200010 | 3072 |
| idle wait time | The total time of idle waits, which is the total time when the session is in an idle wait state. | 200011 | 3072 |
| background database time | The total time of database operations executed by background processes. | 200012 | 3072 |
| background database non-idle wait time | The total time of database operations executed by background processes in non-idle wait states. | 200013 | 3072 |
| background database idle wait time | The total time of database operations executed by background processes in idle wait states. | 200014 | 3072 |
| concurrency wait total time | The total wait time due to concurrency issues, such as the wait time due to resource locking. | 220001 | 3072 |
| user io wait total time | The total wait time of user processes for I/O operations (such as data read and write to disk). | 220002 | 3072 |
| application wait total time | The total wait time of user application code, such as lock waits caused by row-level locking or explicit locking commands. | 2200013 | 3072 |
Sample query
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_WR_SYS_TIME_MODEL LIMIT 10;
The query result is as follows:
+------------+-----------+---------+----------------+----------+---------+-------------------------+-----------+
| CLUSTER_ID | TENANT_ID | SNAP_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE |
+------------+-----------+---------+----------------+----------+---------+-------------------------+-----------+
| 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 |
| 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 |
| 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 |
| 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 |
| 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 233110335 |
| 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 116267272 |
| 10001 | 1002 | 2 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 209738761 |
| 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 104674501 |
| 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 32539 |
| 10001 | 1002 | 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 |
+------------+-----------+---------+----------------+----------+---------+-------------------------+-----------+
10 rows in set