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_SESS_TIME_MODEL view displays session-level time model statistics in the cluster.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| SID | NUMBER | NO | The session ID. |
| TENANT_ID | NUMBER | NO | The tenant ID. |
| SVR_IP | VARCHAR2(46) | NO | The IP address of the node. |
| SVR_PORT | NUMBER(38) | NO | The port number of the node. |
| STAT_ID | NUMBER | NO | The ID of the statistic. |
| STAT_NAME | VARCHAR2(64) | NO | The name of the statistic. |
| VALUE | NUMBER | NO | The value of the statistic. |
The values in the STAT_NAME column of this view are the names and corresponding IDs of the statistics as shown in the following table.
| Statistic Name | Description | Statistic ID | Statistic Type |
|---|---|---|---|
| DB time | The total time spent on database activities, including CPU and non-idle wait times. | 200001 | 3072 |
| DB CPU | The CPU time spent on database activities. | 200002 | 3072 |
| background elapsed time | The total time spent on background processes. | 200005 | 3072 |
| background cpu time | The CPU time spent on background processes. | 200006 | 3072 |
| non idle wait time | The total time spent on non-idle waits, which is the time when the session is waiting but not in idle wait. | 200010 | 3072 |
| idle wait time | The total time spent on idle waits, which is the time when the session is in idle wait. | 200011 | 3072 |
| background database time | The total time spent on database operations by background processes. | 200012 | 3072 |
| background database non-idle wait time | The time spent on non-idle waits by background processes for database operations. | 200013 | 3072 |
| background database idle wait time | The time spent on idle waits by background processes for database operations. | 200014 | 3072 |
| concurrency wait total time | The total time spent on concurrency waits, such as waiting for resource locks. | 220001 | 3072 |
| user io wait total time | The total time spent on I/O operations by user processes, such as reading or writing data to disk. | 220002 | 3072 |
| application wait total time | The total time spent on application waits, such as lock waits caused by row-level locks or explicit lock commands. | 2200013 | 3072 |
Sample query
Display the first session-level time model statistic on all nodes.
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