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

本站中文解释

V$PQ_TQSTAT:显示当前池中已存在的参数队列(PQ)任务的状态信息。

定义:
V$PQ_TQSTAT 作为视图,它以表格形式展示了 PQ 任务(PQ_TQ)池中任务的状态信息,包括任务的内部编号、PQ 指派请求的索引、状态、开始时间、结束时间、子进程 ID、等待时间和任务是否取消等。

用途:
通过 V$PQ_TQSTAT 视图,可以查看后台进程执行情况,分析任务执行持续时间,检测 PQ 池是否变慢等。

使用:
1.检查 PQ 池中的任务:
SELECT TQNAME,STATE,START_TIME,ELAPSED_TIME FROM V$PQ_TQSTAT;

2.检查当前正在执行的任务:
SELECT PQ_TQNAME FROM V$PQ_TQSTAT WHERE STATE=’RUNNING’;

3.查看 PQ 任务的等待时间:
SELECT TQNAME, WAIT_TIME FROM V$PQ_TQSTAT ORDER BY WAIT_TIME DESC;

官方英文解释

V$PQ_TQSTAT contains statistics on parallel execution operations. The statistics are compiled after the query completes and only remain for the duration of the session. It displays the number of rows processed through each parallel execution server at each stage of the execution tree. This view can help determine skew problems in a query’s execution. (Note that for PDML, information from V$PQ_TQSTAT is available only after a commit or rollback operation.)
Column Datatype Description

DFO_NUMBER

NUMBER

Data flow operator (DFO) tree number to differentiate queries

TQ_ID

NUMBER

Table queue ID within the query, which represents the connection between two DFO nodes in the query execution tree

SERVER_TYPE

VARCHAR2(10)

The role in table queue – producer/consumer/ranger

NUM_ROWS

NUMBER

The number of rows produced/consumed

BYTES

NUMBER

The number of bytes produced/consumed

OPEN_TIME

NUMBER

Time (seconds) the table queue remained open

AVG_LATENCY

NUMBER

Time (minutes) for a message to be dequeued after it enters the queue

WAITS

NUMBER

The number of waits encountered during dequeue

TIMEOUTS

NUMBER

The number of timeouts when waiting for a message

PROCESS

VARCHAR2(6)

Process ID

INSTANCE

NUMBER

Instance ID

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