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

本站中文解释

Oracle视图V$PQ_SESSTAT是一个性能视图,可用于查看每个会话上对并行查询操作的估计统计信息。这个视图中的数据有助于用户了解每个会话的数据处理情况,这有助于评估会话的运行性能,从而决定有效的会话优化策略。

使用V$PQ_SESSTAT视图可以实现以下用途:
1、评估会话的数据处理性能:可以通过该视图查看会话处理的字节数、运行的查询数量、以及执行计划的操作数量等信息,以及执行计划的使用状态,清楚了解会话的数据处理性能。
2、检查等待事件:可以查看回话上执行查询所遇到了多少等待事件,从而推断出可能有效优化会话所应采取的措施。
3、确定会话优化策略:可以通过该视图获取关于并行查询操作的统计信息,比如索引扫描、全表扫描等,从而决定有效的会话优化策略。

要使用V$PQ_SESSTAT视图,可以使用select * from v$pq_sesstat语句,查询需要的信息,比如查询某个会话的信息。

官方英文解释

V$PQ_SESSTAT lists session statistics for parallel queries. After you have run a query or DML operation, you can use the information derived from V$PQ_SESSTAT to view the number of slave processes used, and other information for the session and system.
Column Datatype Description

STATISTIC

VARCHAR2(30)

Name of the statistic:

  • Queries Parallelized – Number of queries run in parallel

  • DDL Parallelized – Number of DDL operations run in parallel

  • DML Parallelized – Number of DML operations run in parallel

  • DFO Trees – Number of executed DFO trees

  • DOP – Degree of parallelism used for the last statement

  • Server Threads – Number of PX servers used

  • Allocation Height – Requested number of servers per instance

  • Allocation Width – Requested number of instances

  • Local Msgs Sent – Number of local (intra-instance) messages sent

  • Distr Msgs Sent – Number of remote (inter-instance) messages sent

  • Local Msgs Recv'd – Number of local (intra-instance) messages received

  • Distr Msgs Recv'd – Number of remote (inter-instance) messages received

  • Slave Sets – Total number of slave sets used for the last statement. For multiple parallelizers in the parallel plan, it is the cumulative count.

LAST_QUERY

NUMBER

Value of the statistic for the last operation

SESSION_TOTAL

NUMBER

Value of the statistic for the entire session to this point in time.

The value of the statistic for the entire session to this point in time is not maintained for the DOP, Server Threads, Allocation Height, Allocation Width, and Slave Set statistics.

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