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

本站中文解释

Oracle视图V$SQL_CS_SELECTIVITY是一个虚拟视图,它存储来自V$SQL查看的SQL语句的查询特性信息,用于优化器询问过滤器选择比率的估计。它的常用的字段如下:

-SQL_ID:SQL语句的唯一标识;
-ADDRESS:由ACCESS_ADDRESS字段产生;
-HASH_VALUE:SQL编号的散列值;
-LAST_ANALYZED:最近分析SQL语句;
-FILTER_SELECTIVITY:可以帮助优化器估计过滤器选择率,如果为子查询,将会显示外部和内部查询过滤器选择率;
-CHILD_NUMBER:表示这些记录是一个语句中的多部分,其中第一部分为1;
-NODE_ID:这是一个SQL_PLAN中的各个节点的ID;
-PREFIX_COMMENT:ORACLE收集的标准有用信息,其中包含特定的过滤器的信息;

使用V$SQL_CS_SELECTIVITY视图可以让DBA可以获取来自V$SQL_PLAN_STATISTICS_ALL视图中的关键调用统计信息,增强SQL语句诊断信息的生成。

官方英文解释

V$SQL_CS_SELECTIVITY exposes the valid selectivity ranges for a child cursor in extended cursor sharing mode. A valid range consists of a low and high value for each predicate containing binds. Each predicate’s selectivity (with the current bind value) must fall between the corresponding low and high values in order for the child cursor to be shared.
Column Datatype Description

ADDRESS

RAW(4 | 8)

Address of the handle to the parent for this cursor

HASH_VALUE

NUMBER

Hash value of the parent statement in the library cache

SQL_ID

VARCHAR2(13)

SQL identifier of the parent cursor in the library cache

CHILD_NUMBER

NUMBER

Number of the child cursor

PREDICATE

VARCHAR2(40)

Predicate whose selectivity must fall between low and high values

RANGE_ID

NUMBER

Identifier for the range used to match up the low and high values for multiple predicates

LOW

VARCHAR2(10)

Lower bound for allowable selectivity

HIGH

VARCHAR2(10)

Upper bound for allowable selectivity

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