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

本站中文解释

ALL_PART_HISTOGRAMS视图用于检索表和索引分区上的直方图信息,它包含了一系列帮助Optimizer 做优化工作的信息,ALL_PART_HISTOGRAMS视图是由DBMS_STATS包中的PART_HISTOGRAM_BY_PART_NAME函数维护的。

使用方法如下:
1.查看系统中所有直方图的信息:
SELECT * FROM ALL_PART_HISTOGRAMS;

2.查询指定表的所有直方图信息:
SELECT * FROM ALL_PART_HISTOGRAMS WHERE TABLE_NAME = ‘TABLE_NAME’;

3.查询指定表指定索引的直方图信息:
SELECT * FROM ALL_PART_HISTOGRAMS WHERE TABLE_NAME = ‘TABLE_NAME’ AND INDEX_NAME = ‘INDEX_NAME’;

官方英文解释

ALL_PART_HISTOGRAMS displays the histogram data (endpoints per histogram) for the histograms on the table partitions accessible to the current user.

Related Views

  • DBA_PART_HISTOGRAMS displays the histogram data for the histograms on all table partitions in the database.

  • USER_PART_HISTOGRAMS displays the histogram data for the histograms on the table partitions owned by the current user. This view does not display the OWNER column.

Note:

These views are populated only if you collect statistics on the index using the DBMS_STATS package.

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 table partition

COLUMN_NAME

VARCHAR2(4000)

Name of the column

BUCKET_NUMBER

NUMBER

Bucket number of the histogram

ENDPOINT_VALUE

NUMBER

Normalized endpoint values for the bucket

ENDPOINT_ACTUAL_VALUE

VARCHAR2(4000)

Actual (not normalized) string value of the endpoint for the bucket

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_PART_HISTOGRAMS”

  • “USER_PART_HISTOGRAMS”

  • Oracle Database PL/SQL
    Packages and Types Reference
    for more information about the DBMS_STATS package


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