Note
- Starting from V4.3.5, this view is introduced in V4.3.x.
- Starting from V4.2.2, this view is introduced in V4.2.x.
Purpose
The GV$OB_SESS_TIME_MODEL view displays the time model statistics for sessions in the cluster.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SID | NUMBER | NO | Session ID |
| TENANT_ID | NUMBER | NO | Tenant ID |
| SVR_IP | VARCHAR2(46) | NO | Node IP |
| SVR_PORT | NUMBER(38) | NO | Node port |
| STAT_ID | NUMBER | NO | Stat ID |
| STAT_NAME | VARCHAR2(64) | NO | Stat name |
| VALUE | NUMBER | NO | Stat value |
The following table describes the statistics events and their IDs in the STAT_NAME column.
| Statistics event | Description | Stat ID | Stat 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 CPU time of database activities. | 200002 | 3072 |
| background elapsed time | The total time of background processes. | 200005 | 3072 |
| background cpu time | The CPU time of background processes. | 200006 | 3072 |
| non idle wait time | The total time of non-idle waits, which is the total time when the session is in a waiting state but not in an idle wait state. | 200010 | 3072 |
| idle wait time | The total time of idle waits, which is the total time when the session is in an idle wait state. | 200011 | 3072 |
| background database time | The total time of database operations performed by background processes. | 200012 | 3072 |
| background database non-idle wait time | The total time of database operations performed by background processes in non-idle wait states. | 200013 | 3072 |
| background database idle wait time | The total time of database operations performed by background processes in idle wait states. | 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 waiting for I/O operations (such as data reads or writes 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 locking or explicit lock commands). | 2200013 | 3072 |
Sample query
obclient [SYS]> SELECT * FROM SYS.GV$OB_SESS_TIME_MODEL WHERE ROWNUM = 1;
The query result is as follows:
+---------------+-----------+----------------+----------+---------+--------------------+-------+
| SID | TENANT_ID | SVR_IP | SVR_PORT | STAT_ID | STAT_NAME | VALUE |
+---------------+-----------+----------------+----------+---------+--------------------+-------+
| 4947802324992 | 1004 | 172.xx.xxx.xxx | 2882 | 200010 | non idle wait time | 0 |
+---------------+-----------+----------------+----------+---------+--------------------+-------+
1 row in set