Oracle 视图 DBA_HIST_SESS_TIME_STATS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图DBA_HIST_SESS_TIME_STATS用于显示会话操作消耗的时间统计信息,对数据库中每次会话执行记录中每个步骤执行消耗时间的累计信息,可以统计出某次会话执行每步骤耗时。

使用方法

1、在Oracle数据库控制台中,使用以下SQL语句查看当前会话操作耗时:

SELECT SQL_ID,SESSION_ID,SESSION_SERIAL#,EVENT,TIME_WAITED
FROM DBA_HIST_SESS_TIME_STATS
WHERE TIME_WAITED > 0
2、使用以下SQL语句可以查看一段时间内某个会话的操作耗时:
SELECT SQL_ID,SESSION_ID,SESSION_SERIAL#,EVENT,TIME_WAITED,SAMPLE_TIME
FROM DBA_HIST_SESS_TIME_STATS
WHERE SESSION_ID= AND SAMPLE_TIME > to_date(‘20200101′,’yyyymmdd’);

官方英文解释

DBA_HIST_SESS_TIME_STATS displays information about CPU and I/O time for interesting Oracle GoldenGate and XStream sessions.

Column Datatype NULL Description

SNAP_ID

NUMBER

NOT NULL

Unique snapshot ID

DBID

NUMBER

NOT NULL

Database ID for the snapshot

INSTANCE_NUMBER

NUMBER

NOT NULL

Instance number for the snapshot

SESSION_TYPE

VARCHAR2(64)

NOT NULL

Type of session

MIN_LOGON_TIME

DATE

Minimum logon time

SUM_CPU_TIME

NUMBER

Total CPU time

SUM_SYS_IO_WAIT

NUMBER

Total system I/O wait time

SUM_USER_IO_WAIT

NUMBER

Total user I/O wait time

CON_DBID

NUMBER

The database ID of the PDB for the sampled session

SESSION_MODULE

VARCHAR2(64)

NOT NULL

Session module. Valid values:

  • XStream

  • GoldenGate

CON_ID

NUMBER

The ID of the container that CON_DBID identifies. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data


数据运维技术 » Oracle 视图 DBA_HIST_SESS_TIME_STATS 官方解释,作用,如何使用详细说明