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

本站中文解释

V$BUFFERED_QUEUES视图用于显示内存队列中缓存或待消费的消息。用户可以通过查询此视图来查看内存队列当前的状态和信息,以确保数据流正确性。具体列如下表所示:

列 | 说明
———————|———————
QUEUE_OWNER | 内存队列的拥有者
QUEUE_NAME | 内存队列的简单名称
ENQUEUE_TIME | 该消息进入内存队列的时间
MESSAGE_ID | 消息的标识符
CONSUMER_NAME | 消费者的名称
MESSAGE_STATE | 缓冲的消息的状态
MESSAGE_GROUP_ID | 消息的组ID

使用方法:

1、查询某个内存队列存在于缓冲区的消息数量:

SELECT COUNT(*) FROM V$BUFFERED_QUEUES WHERE QUEUE_NAME=;

2、查询缓冲区某个消息是否存在某个内存队列:

SELECT * FROM V$BUFFERED_QUEUES WHERE QUEUE_NAME= and MESSAGE_ID=;

官方英文解释

V$BUFFERED_QUEUES displays information about all buffered queues in the instance. There is one row per queue.

Column Datatype Description

QUEUE_ID

NUMBER

Identifier for the queue

QUEUE_SCHEMA

VARCHAR2(128)

Owner of the queue

QUEUE_NAME

VARCHAR2(128)

Name of the queue

STARTUP_TIME

DATE

Startup time

NUM_MSGS

NUMBER

Total number of messages currently in the buffered queue

SPILL_MSGS

NUMBER

Current number of overflow messages spilled to disk from the buffered queue

CNUM_MSGS

NUMBER

Cumulative total number of messages enqueued into the buffered queue since the database last started

CSPILL_MSGS

NUMBER

Cumulative total number of overflow messages spilled to disk from the buffered queue since the database last started

EXPIRED_MSGS

NUMBER

Number of expired messages

OLDEST_MSGID

RAW(16)

Message ID of the oldest message

OLDEST_MSG_ENQTM

TIMESTAMP(3)

Enqueue time of the oldest message

QUEUE_STATE

VARCHAR2(25)

Indicates whether the queue is in recovery mode (QUEUE IS IN RECOVERY MODE) or not (NORMAL)

ELAPSED_ENQUEUE_TIME

NUMBER

Total time spent in enqueue (in hundredths of a second)

ELAPSED_DEQUEUE_TIME

NUMBER

Total time spent in dequeue (in hundredths of a second)

ELAPSED_TRANSFORMATION_TIME

NUMBER

Total time for evaluating transformations (in hundredths of a second)

ELAPSED_RULE_EVALUATION_TIME

NUMBER

Total time for rule evaluations (in hundredths of a second)

ENQUEUE_CPU_TIME

NUMBER

Total CPU time for enqueue (in hundredths of a second)

DEQUEUE_CPU_TIME

NUMBER

Total CPU time for dequeue (in hundredths of a second)

AVG_MSG_AGE

NUMBER

Average age of messages in the queue

LAST_ENQUEUE_TIME

TIMESTAMP(3) WITH TIME ZONE

Last message enqueue time

LAST_DEQUEUE_TIME

TIMESTAMP(3) WITH TIME ZONE

Last message dequeue time

QUEUE_SIZE

NUMBER

Size of queue, which is the total number of bytes allocated for all messages and metadata

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