Oracle 视图 V$SYS_TIME_MODEL 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图V$SYS_TIME_MODEL是一个系统模式视图,它报告介绍了系统运行时各种任务的计时信息。
它的列包括: STAT_ID:特定的统计标识符;STAT_NAME:统计的名字;
;VALUE:时间的值;AVERAGE:均值;ELAPSED_TIME:持续的时间;ELAPSED_TIME_DELTA:持续的时间的变化;TIME_WAITED:等待的时间;SESSION_ID:会话标识符;WAITS:统计信息的等待数量。
这个视图主要用于进行性能跟踪,它可以帮助DBA来评估系统的运行状态,看看哪些组件等待的时间最长。
使用方法:
获取性能数据:
SELECT * FROM V$SYS_TIME_MODEL WHERE STAT_NAME = ‘DB time’;
查看系统中每个会话的等待时间:
SELECT SESSION_ID, STAT_NAME, TIME_WAITED FROM V$SYS_TIME_MODEL WHERE stat_name LIKE ‘%wait time’;
官方英文解释
V$SYS_TIME_MODEL
displays the system-wide accumulated times for various operations. The time reported is the total elapsed or CPU time (in microseconds). Any timed operation will buffer at most 5 seconds of time data. Specifically, this means that if a timed operation (such as SQL execution) takes a long period of time to perform, the data published to this view is at most missing 5 seconds of the time accumulated for the operation.
The time values are 8-byte integers and can therefore hold approximately 580,000 years worth of time before wrapping. Background process time is not included in a statistic value unless the statistic is specifically for background processes.
Column | Datatype | Description |
---|---|---|
|
|
Statistic identifier for the time statistic |
|
|
Name of the statistic (see Table 10-1) |
|
|
Amount of time (in microseconds) that the system has spent in this operation |
|
|
The ID of the container to which the data pertains. Possible values include:
|
Note:
This view returns instance-wide data and a value of 0
in the CON_ID
column when queried from the root of a CDB.