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


本站中文解释

ALL_TAB_HISTGRM_PENDING_STATS 视图是Oracle数据库中一个系统视图,由用户SYS在syscatschema中可以看到这个视图的定义。这个视图的用途是报告用于支持SQL string auto-tuning的数据。通过这个视图我们可以检查相关表的历史信息是否完整,并获得该表相关信息,有助于我们进行开发工作。

使用Oracle视图ALL_TAB_HISTGRM_PENDING_STATS,我们可以执行如下操作:

1. 查询指定表的历史信息是否完整:
SELECT * From ALL_TAB_HISTGRM_PENDING_STATS WHERE owner=’&schema’ AND table_name = ‘&table’;

2. 根据表查询历史表信息:
SELECT * From ALL_TAB_HISTGRM_PENDING_STATS WHERE owner=’&schema’ AND obj# IN(SELECT obj#
FROM DBA_HIST_SOBJ WHERE owner=’&schema’ AND name=’&table’);

3. 根据Schema查询历史表信息:
SELECT * From ALL_TAB_HISTGRM_PENDING_STATS WHERE owner=’&schema’;

官方英文解释

ALL_TAB_HISTGRM_PENDING_STATS describes pending statistics for tables, partitions, and subpartitions accessible to the current user.

Related Views

  • DBA_TAB_HISTGRM_PENDING_STATS describes pending statistics for tables, partitions, and subpartitions in the database.

  • USER_TAB_HISTGRM_PENDING_STATS describes pending statistics for tables, partitions, and subpartitions owned by the current user. This view does not display the OWNER column.

ColumnDatatypeNULLDescription

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

ENDPOINT_NUMBER

NUMBER

Endpoint number

ENDPOINT_VALUE

NUMBER

Normalized endpoint value

ENDPOINT_ACTUAL_VALUE

VARCHAR2(4000)

Actual endpoint value

ENDPOINT_ACTUAL_VALUE_RAW

RAW(1000)

Endpoint actual value in raw format

ENDPOINT_REPEAT_COUNT

NUMBER

Frequency of the endpoint (applies only to hybrid histograms, and is set to 0 for other histogram types)

See Also:

  • “DBA_TAB_HISTGRM_PENDING_STATS”

  • “USER_TAB_HISTGRM_PENDING_STATS”