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

本站中文解释

Oracle视图ALL_COL_PENDING_STATS是ALL_TAB_COL_STATISTICS视图与ALL_TAB_MODIFICATIONS视图的联合查询,它包含还未收集的列统计信息。

它显示查询哪些表(OWNER、TABLE_NAME)和列(TABLE_NAME、COLUMN_NAME)上的统计信息还未收集,即PENDING_STATS列显示YES。

下面是它的说明:

ALL_COL_PENDING_STATS视图是一个[DS]视图,其中[DS]表示”Data Dictionary,因此,它提供了可用的数据字典表的信息。它显示查询那些表上的列仍未收集统计信息。其中OWNER,TABLE_NAME以及COLUMN_NAME列提供了查询表和列的名称,而PENDING_STATS列提供了true或false值,表明该列是否已收集统计信息;YES,表明尚未收集,而NO表示已收集。

使用Oracle视图ALL_COL_PENDING_STATS主要是为了帮助检查数据库中的统计信息收集情况,或者判断某些表和列上的统计信息是否已收集。例如,我们可以使用它查找是哪些表和列的统计信息还未被收集,以便做进一步的优化工作。

使用此视图非常简单,你只需要简单的查询即可,例如:

SELECT OWNER,TABLE_NAME,COLUMN_NAME,PENDING_STATS
FROM ALL_COL_PENDING_STATS
WHERE PENDING_STATS = ‘YES’;

官方英文解释

ALL_COL_PENDING_STATS describes the pending statistics of the columns accessible to the current user.

Related Views

  • DBA_COL_PENDING_STATS describes the pending statistics of all columns in the database.

  • USER_COL_PENDING_STATS describes the pending statistics of the columns owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

Owner of the table

TABLE_NAME

VARCHAR2(128)

Name of the table

PARTITION_NAME

VARCHAR2(128)

Name of the partition

SUBPARTITION_NAME

VARCHAR2(128)

Name of the subpartition

COLUMN_NAME

VARCHAR2(128)

Name of the column

NUM_DISTINCT

NUMBER

Number of distinct values in the column

LOW_VALUE

RAW(32)

Low value in the column

HIGH_VALUE

RAW(32)

High value in the column

DENSITY

NUMBER

If a histogram is available on COLUMN_NAME, then this column displays the selectivity of a value that spans fewer than 2 endpoints in the histogram. It does not represent the selectivity of values that span 2 or more endpoints.

If a histogram is not available on COLUMN_NAME, then the value of this column is 1/NUM_DISTINCT.

NUM_NULLS

NUMBER

Number of NULLs in the column

AVG_COL_LEN

NUMBER

Average length of the column (in bytes)

SAMPLE_SIZE

NUMBER

Sample size used in analyzing the column

LAST_ANALYZED

DATE

Most recent date on which the column was analyzed

See Also:

  • “DBA_COL_PENDING_STATS”

  • “USER_COL_PENDING_STATS”


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