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 GV$OB_SYS_TIME_MODEL view displays the Time Model statistics at the tenant level in the cluster.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant 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 values in the STAT_NAME column of this view are the names and IDs of the statistics, as shown in the following table.
| Statistic Name | Description | Statistic ID | Statistic Type |
|---|---|---|---|
| DB time | The total time of database activity, including the accumulated CPU and non-idle wait time. | 200001 | 3072 |
| DB CPU | The time consumed by the CPU during database activity. | 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 waiting states, where sessions are waiting but not in idle wait. | 200010 | 3072 |
| idle wait time | The total time spent in idle waiting 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 waiting states during database operations. | 200013 | 3072 |
| background database idle wait time | The time spent by background processes in idle waiting states during database operations. | 200014 | 3072 |
| concurrency wait total time | The total waiting time caused by concurrency issues, such as waiting due to resource locking. | 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 waiting time caused by user application code, such as lock waiting due to row-level locking or explicit lock commands. | 2200013 | 3072 |
Sample query
Query the Time Model statistics at the tenant level in the cluster and display the first 10 records.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_SYS_TIME_MODEL LIMIT 10;
The query result is as follows:
+-----------+----------------+----------+---------+-------------------------+------------+
| TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE |
+-----------+----------------+----------+---------+-------------------------+------------+
| 1 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 2911090188 |
| 1 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 2018470248 |
| 1 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 3114667745 |
| 1 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 2869450240 |
| 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 892619940 |
| 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 6902209 |
| 1001 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 0 |
| 1001 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 0 |
| 1001 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 2820581754 |
| 1001 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 2619172661 |
+-----------+----------------+----------+---------+-------------------------+------------+
10 rows in set