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

本站中文解释

V$SESSION_WAIT_CLASS是Oracle视图。它的作用是记录每个会话的当前等待事件的等待类别。

它使用它记录等待类别和等待时间,并且可以用来查找系统中可能存在哪些等待事件。可以通过查看V$SESSION_WAIT_CLASS来评估系统性能。

要使用V$SESSION_WAIT_CLASS,你可以使用如下SQL查询它们:

SELECT sid, event#, wait_class, time_waited
FROM V$SESSION_WAIT_CLASS
WHERE sid IN (SELECT sid
FROM V$SESSION
WHERE username = ‘&user_name’);

上面的SQL语句将返回特定用户的会话空闲等待类别和等待时间。

官方英文解释

V$SESSION_WAIT_CLASS displays the time spent in various wait event operations on a per-session basis.

Column Datatype Description

SID

NUMBER

Session identifier

SERIAL#

NUMBER

Serial number

WAIT_CLASS_ID

NUMBER

Identifier of the wait class

WAIT_CLASS#

NUMBER

Number of the wait class

WAIT_CLASS

VARCHAR2(64)

Name of the wait class

TOTAL_WAITS

NUMBER

Total number waits from this wait class by the session

TIME_WAITED

NUMBER

Total amount of time spent in waits from this wait class by the session (in hundredths of a second)

TIME_WAITED_MICRO

NUMBER

Total amount of time spent in waits from this wait class by the session (in microseconds)

CPU

NUMBER

Total amount of CPU time consumed by the session while implementing waits from this wait class (in microseconds)

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