oceanbase.CDB_WR_SYS_TIME_MODEL

2026-02-05 05:53:37  Updated

Note

  • This view is available starting with V4.3.5 for V4.3.x.
  • This view is available starting with V4.2.2 for V4.2.x.

Purpose

The CDB_WR_SYS_TIME_MODEL view displays the WR data of Time Model statistics for all tenants.

Columns

Column Type Nullable? Description
CLUSTER_ID bigint(20) NO The cluster ID.
TENANT_ID bigint(20) NO The tenant ID.
SNAP_ID bigint(20) NO The snapshot ID.
SVR_IP varchar(46) NO The IP address of the node.
SVR_PORT bigint(20) NO The port number of the node.
STAT_ID bigint(20) NO The ID of the statistic.
STAT_NAME varchar(64) NO The name of the statistic.
VALUE bigint(20) NO The value of the statistic.

The following table describes the values in the STAT_NAME column of the view.

Statistic Name Description Statistic ID Statistic Type
DB time The total time spent on database activities, including CPU and non-idle wait times. 200001 3072
DB CPU The time spent on CPU activities in the database. 200002 3072
background elapsed time The total time spent on background processes. 200005 3072
background cpu time The CPU time spent on background processes. 200006 3072
non idle wait time The total time spent on non-idle waits, i.e., the time when sessions are in a waiting state but not in idle wait. 200010 3072
idle wait time The total time spent on idle waits, i.e., the time when sessions are in an idle wait state. 200011 3072
background database time The total time spent on database operations by background processes. 200012 3072
background database non-idle wait time The time spent on database operations by background processes in a non-idle wait state. 200013 3072
background database idle wait time The time spent on database operations by background processes in an idle wait state. 200014 3072
concurrency wait total time The total time spent on waits caused by concurrency issues, such as waiting for resource locks. 220001 3072
user io wait total time The total time spent on I/O operations by user processes, such as reading or writing data to disk. 220002 3072
application wait total time The total time spent on waits caused by user application code, such as lock waits due to row-level locks or explicit lock commands. 2200013 3072

Sample query

Query the WR data of Time Model statistics for all tenants and display the first 10 rows.

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

References

Contact Us