Note
- The view was introduced in OceanBase Database V4.3.5 for V4.3.x.
- The view was introduced in OceanBase Database V4.2.2 for V4.2.x.
Purpose
The V$OB_SYS_TIME_MODEL view displays the Time Model statistics for the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant 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 events in the STAT_NAME column and their corresponding statistics event IDs.
| Statistics event | Description | Statistics event ID | Statistics event type |
|---|---|---|---|
| DB time | The total time of database activities, which is the sum of CPU time and non-idle wait time. | 200001 | 3072 |
| DB CPU | The time consumed by the database activities on the CPU. | 200002 | 3072 |
| background elapsed time | The total time spent by background processes. | 200005 | 3072 |
| background cpu time | The CPU time consumed by background processes. | 200006 | 3072 |
| non idle wait time | The total time when sessions are in wait states but not in idle wait states. | 200010 | 3072 |
| idle wait time | The total time when sessions are in idle wait states. | 200011 | 3072 |
| background database time | The total time spent by background processes on database operations. | 200012 | 3072 |
| background database non-idle wait time | The total time when background processes are in non-idle wait states on database operations. | 200013 | 3072 |
| background database idle wait time | The total time when background processes are in idle wait states on database operations. | 200014 | 3072 |
| concurrency wait total time | The total wait time due to concurrency issues, such as 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 reading or writing to disk). | 220002 | 3072 |
| application wait total time | The total wait time generated by user application code (such as lock wait time due to row-level locking or explicit lock commands). | 2200013 | 3072 |
Sample query
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_SYS_TIME_MODEL;
The query result is as follows:
+-----------+----------------+----------+---------+-------------------------+------------+
| TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE |
+-----------+----------------+----------+---------+-------------------------+------------+
| 1002 | 172.xx.xxx.xxx | 2882 | 200001 | DB time | 6227784 |
| 1002 | 172.xx.xxx.xxx | 2882 | 200002 | DB CPU | 5586418 |
| 1002 | 172.xx.xxx.xxx | 2882 | 200005 | background elapsed time | 3399416601 |
| 1002 | 172.xx.xxx.xxx | 2882 | 200006 | background cpu time | 3089779843 |
| 1002 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 641366 |
| 1002 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 80414 |
+-----------+----------------+----------+---------+-------------------------+------------+
6 rows in set