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

本站中文解释

Oracle 视图—V$SESSION_WAIT_HISTORY 记录了每个会话里等待时间最长的当前等待事件以及上一个事件的数据。V$SESSION_WAIT_HISTORY 应用于收集和诊断Oracle数据库在执行活动时出现的等待情况和执行响应时间。

使用 V$SESSION_WAIT_HISTORY:
1.通过查询V$SESSION_WAIT_HISTORY视图,可实时监控会话参数SECONDS_IN_WAIT和EVENT;
2.具体可使用如下查询语句:SELECT * FROM V$SESSION_WAIT_HISTORY WHERE ‘SID=’会话号;
3.查询结果可从SECONDS_IN_WAIT 和 EVENT 字段中获取某会话当前等待的秒数和等待的事件,从而进行实时会话监控。

官方英文解释

V$SESSION_WAIT_HISTORY displays the last 10 wait events for each active session.

Column Datatype Description

SID

NUMBER

Session identifier

SEQ#

NUMBER

Sequence of wait events; 1 is the most recent

EVENT#

NUMBER

Event number

EVENT

VARCHAR2(64)

Resource or event for which the session is waiting

P1TEXT

VARCHAR2(64)

Description of the first wait event parameter

P1

NUMBER

First wait event parameter (in decimal)

P2TEXT

VARCHAR2(64)

Description of the second wait event parameter

P2

NUMBER

Second wait event parameter (in decimal)

P3TEXT

VARCHAR2(64)

Description of the third wait event parameter

P3

NUMBER

Third wait event parameter (in decimal)

WAIT_TIME

NUMBER

Amount of time waited (in hundredths of a second)

WAIT_TIME_MICRO

NUMBER

Amount of time waited (in microseconds)

TIME_SINCE_LAST_WAIT_MICRO

NUMBER

Time elapsed (in microseconds) since the end of the previous wait in the wait history

CON_ID

NUMBER

The ID of the container to which the data pertains. 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 视图 V$SESSION_WAIT_HISTORY 官方解释,作用,如何使用详细说明