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

本站中文解释

也叫V$SYSTEM_EVENT视图,用于显示会话等待事件的信息,其中 V$SESSION_EVENT.EVENT即做为事件名称,有些事件是比较常被其他程序使用,比如SQL*Net message from client,Oracle系统自执行的sql会有不同的等待事件,比如

library cache pin、direct path read/write 等。可以用如下查询来查看有关的会话的等待事件情况:

SELECT s.sid,
s.serial#,
se.event,
se.seconds_in_wait,
se.state
FROM v$session s,
v$session_event se
WHERE s.sid = se.sid
AND s.serial# = se.serial#;

官方英文解释

V$SESSION_EVENT displays information on waits for an event by a session. Note that the TIME_WAITED and AVERAGE_WAIT columns will contain a value of zero on those platforms that do not support a fast timing mechanism. If you are running on one of these platforms and you want this column to reflect true wait times, then you must set TIMED_STATISTICS to true in the parameter file; doing this will have a small negative effect on system performance.

See Also:

“TIMED_STATISTICS”

Column Datatype Description

SID

NUMBER

Session identifier

EVENT

VARCHAR2(64)

Name of the wait event; derived statistic name from V$EVENT_NAME

See Also: “Oracle Wait Events”

TOTAL_WAITS

NUMBER

Total number of waits for the event by the session

TOTAL_TIMEOUTS

NUMBER

Total number of timeouts for the event by the session

TIME_WAITED

NUMBER

Total amount of time waited for the event by the session (in hundredths of a second)

AVERAGE_WAIT

NUMBER

Average amount of time waited for the event by the session (in hundredths of a second)

MAX_WAIT

NUMBER

Maximum amount of time waited for the event by the session (in hundredths of a second)

TIME_WAITED_MICRO

NUMBER

Total amount of time waited for the event by the session (in microseconds)

CPU

NUMBER

Total amount of CPU time consumed by the session while implementing the wait event itself (in microseconds)

EVENT_ID

NUMBER

Identifier of the wait event

WAIT_CLASS_ID

NUMBER

Identifier of the wait class of the wait event

WAIT_CLASS#

NUMBER

Number of the wait class of the wait event

WAIT_CLASS

VARCHAR2(64)

Name of the wait class of the wait event

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_EVENT 官方解释,作用,如何使用详细说明