Oracle 视图 ALL_SUBPART_HISTOGRAMS 官方解释,作用,如何使用详细说明
本站中文解释
ALL_SUBPART_HISTOGRAMS是Oracle视图,它提供统计信息,其表示子分区上的列值跨度和其相应的值在该分区上的特定分区数和百分比。它只适用于已建立了分区索引的分区表。通过使用这个视图,可以直接度量表上特定列的值的不同分布,以及分区表中的分布情况。意味着,分区表是如何使用的,以及是否需要重建分区索引,以提高查询的性能。
使用ALL_SUBPART_HISTOGRAMS视图的方法很简单。要使用它,只需在SQL语句中指定OBJECT_NAME参数(此参数指示所要查询的表),以及你希望获得统计信息的列名即可。下面的示例查询检索分区表a表上’col1’列的统计信息:
SELECT * FROM ALL_SUBPART_HISTOGRAMS WHERE OBJECT_NAME=’A’ AND COLUMN_NAME=’COL1′;
以上的SQL语句将会显示分区表a上’col1’列的每一分区的分值段和其所在的百分比。
官方英文解释
ALL_SUBPART_HISTOGRAMS
displays the actual histogram data (end-points per histogram) for histograms on table subpartitions accessible to the current user.
Related Views
-
DBA_SUBPART_HISTOGRAMS
displays this information for all subpartitions in the database. -
USER_SUBPART_HISTOGRAMS
displays this information for subpartitions of all partitioned objects owned by the current user. This view does not display theOWNER
column.
Note:
These views are populated only if you collect statistics on the index using the DBMS_STATS
package.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
Owner of the table |
|
|
|
Name of the table |
|
|
|
Table subpartition name |
|
|
|
Column name |
|
|
|
Bucket number |
|
|
|
Normalized endpoint values for this bucket |
|
|
|
Actual (not normalized) string value of the endpoint for this bucket |
|
|
|
Endpoint actual value in raw format |
|
|
|
Frequency of the endpoint (applies only to hybrid histograms, and is set to 0 for other histogram types) |
See Also:
-
“DBA_SUBPART_HISTOGRAMS”
-
“USER_SUBPART_HISTOGRAMS”
-
Oracle Database PL/SQL
Packages and Types Reference for more information about theDBMS_STATS
package