Overview
The V$OB_SESS_TIME_MODEL view displays time model statistics at the session level for the current node.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| SID | bigint(20) | NO | Session ID |
| TENANT_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | Node IP |
| SVR_PORT | bigint(20) | NO | Node Port Number |
| STAT_ID | bigint(20) | NO | Statistical Item ID |
| STAT_NAME | varchar(64) | NO | Statistical Item Name |
| VALUE | bigint(20) | NO | Statistical Item Value |
The following table describes the statistical event names and their corresponding IDs contained in the STAT_NAME column of the view.
Statistical Event Name |
Description |
Statistics Event ID |
Type of the statistical event |
|---|---|---|---|
| DB time | Total time for database activities, including the cumulative value of CPU time and non-idle wait time. | 200001 | 3072 |
| DB CPU | CPU Time Consumed in Database Activities | 200002 | 3072 |
| background elapsed time | Total Time Spent by Background Processes | 200005 | 3072 |
| background cpu time | CPU Time Consumed by Background Processes | 200006 | 3072 |
| non idle wait time | The total time that the session is in a waiting state but not in an idle wait state. | 200010 | 3072 |
| idle wait time | Idle Waiting Time: The total time the session is in an idle waiting state. | 200011 | 3072 |
| background database time | Total Time for Backend Processes to Perform Database Operations | 200012 | 3072 |
| background database non-idle wait time | The time spent by background processes on database operations when they are not in an idle wait state | 200013 | 3072 |
| background database idle wait time | The amount of time spent by background processes on idling and waiting states before performing database operations | 200014 | 3072 |
| concurrency wait total time | The total wait time caused by concurrency issues, such as the time spent waiting for resource locks. | 220001 | 3072 |
| user io wait total time | The total time spent by a user process waiting for I/O operations (such as reading or writing data to disk) to complete. | 220002 | 3072 |
| application wait total time | The total amount of wait time generated by user application code (for example, lock waits caused by row-level locks or explicit lock commands). | 2200013 | 3072 |
Sample query
View the top 10 records of session-level time model statistics on the current node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$OB_SESS_TIME_MODEL LIMIT 10;
The query result is as follows:
+---------------+-----------+----------------+----------+---------+--------------------+-------+
| SID | TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE |
+---------------+-----------+----------------+----------+---------+--------------------+-------+
| 3298534883328 | 1002 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 |
| 3298534883328 | 1002 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 |
| 3848290697216 | 1001 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 |
| 3848290697216 | 1001 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 |
| 4398046511104 | 1001 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 |
| 4398046511104 | 1001 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 |
| 3221667747 | 1 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 |
| 3221667747 | 1 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 |
| 4947802324992 | 1004 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 |
| 4947802324992 | 1004 | 172.xx.xxx.xxx | 2882 | 200011 | idle wait time | 0 |
+---------------+-----------+----------------+----------+---------+--------------------+-------+
10 rows in set