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

本站中文解释

Oracle视图V$ENQUEUE_STATISTICS可用于检索排它锁过去一段时间的统计信息。它的记录显示了排它锁的统计信息,包括共享锁,排他锁,延迟升级锁,以及标识模式锁的数量。

用法:

首先,可以使用如下SQL语句来查询V$ENQUEUE_STATISTICS视图,以检索以下信息:

SELECT * FROM v$enqueue_statistics;

这将检索所有列中的记录,例如总数,成功数,失败数,等待数,用于排他锁请求,共享锁请求,延迟升级锁请求或符合模式锁请求的时间。

另外,也可以使用条件语句,如下例所示,以查找特定类型的数据:

SELECT * FROM v$enqueue_statistics WHERE lock_type = ‘分布式’;

此查询将显示的总数,成功数,失败数,等待数等信息,仅对于请求分布式锁的情况。

官方英文解释

V$ENQUEUE_STATISTICS displays statistics on the number of enqueue (lock) requests for each type of lock.

V$ENQUEUE_STATISTICS encompasses V$ENQUEUE_STAT and gives more detailed information (several rows for same enqueues with different reasons).

Column Datatype Description

EQ_NAME

VARCHAR2(64)

Name of the enqueue request

EQ_TYPE

VARCHAR2(2)

Type of enqueue requested

REQ_REASON

VARCHAR2(64)

Reason for the enqueue request

TOTAL_REQ#

NUMBER

Total number of enqueue requests or enqueue conversions for this type of enqueue

TOTAL_WAIT#

NUMBER

Total number of times an enqueue request or conversion resulted in a wait

SUCC_REQ#

NUMBER

Number of times an enqueue request or conversion was granted

FAILED_REQ#

NUMBER

Number of times an enqueue request or conversion failed

CUM_WAIT_TIME

NUMBER

Total amount of time (in milliseconds) spent waiting for the enqueue or enqueue conversion

REQ_DESCRIPTION

VARCHAR2(4000)

Description of the enqueue request

EVENT#

NUMBER

Event number

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

See Also:

“V$ENQUEUE_STAT”


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