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 DBA_WR_SYS_TIME_MODEL view displays the WR data of the Time Model statistics of the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| 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 statistics. |
| STAT_NAME | varchar(64) | NO | The name of the statistics. |
| VALUE | bigint(20) | NO | The value of the statistics. |
The STAT_NAME column of this view contains the names and corresponding IDs of the statistics as shown in the following table.
| Statistics Name | Description | Statistics ID | Statistics Type |
|---|---|---|---|
| DB time | The total time for database activities, including the accumulated CPU and non-idle wait time. | 200001 | 3072 |
| DB CPU | The CPU time consumed by database activities. | 200002 | 3072 |
| background elapsed time | The total time consumed by background processes. | 200005 | 3072 |
| background cpu time | The CPU time consumed by background processes. | 200006 | 3072 |
| non idle wait time | The total time spent in non-idle wait states, where sessions are waiting but not idle. | 200010 | 3072 |
| idle wait time | The total time spent in idle wait states. | 200011 | 3072 |
| background database time | The total time consumed by background processes in database operations. | 200012 | 3072 |
| background database non-idle wait time | The time spent by background processes in non-idle wait states for database operations. | 200013 | 3072 |
| background database idle wait time | The time spent by background processes in idle wait states for database operations. | 200014 | 3072 |
| concurrency wait total time | The total wait time caused by concurrency issues, such as waiting due to resource locks. | 220001 | 3072 |
| user io wait total time | The total time spent by user processes waiting for I/O operations (such as reading or writing data to disk) to complete. | 220002 | 3072 |
| application wait total time | The total wait time generated by user application code, such as lock waits caused by row-level locks or explicit lock commands. | 2200013 | 3072 |
Sample query
Query the WR data of the Time Model statistics of the current tenant and display the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_WR_SYS_TIME_MODEL LIMIT 10;
The query result is as follows:
+---------+----------------+----------+---------+-------------------------+-----------+
| SNAP_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE |
+---------+----------------+----------+---------+-------------------------+-----------+
| 2 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 |
| 1 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 34505 |
| 2 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 |
| 1 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 1966 |
| 2 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 233110335 |
| 1 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 116267272 |
| 2 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 209738761 |
| 1 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 104674501 |
| 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 32539 |
| 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 |
+---------+----------------+----------+---------+-------------------------+-----------+
10 rows in set