Oracle 视图 ALL_TAB_COL_STATISTICS 官方解释,作用,如何使用详细说明
本站中文解释
oracle视图ALL_TAB_COL_STATISTICS用于查询当前用户下的所有表和字段的统计信息,包括字段值的个数、最大值、最小值、平均值、估计值等。此视图为用户以及DBA提供了一种简单而高效的数据健康分析工具。
要使用ALL_TAB_COL_STATISTICS视图,可以执行以下查询语句:
SELECT table_name, column_name,num_distinct,histogram,
last_analyzed
FROM all_tab_col_statistics
WHERE columns_owner = ‘用户名’;
上述查询语句用于查询指定用户下的所有表及字段的统计信息,包括表名、字段名、独立值总数、直方图以及最后一次分析信息。
官方英文解释
ALL_TAB_COL_STATISTICS
displays column statistics and histogram information extracted from ALL_TAB_COLUMNS
.
Related Views
-
DBA_TAB_COL_STATISTICS
displays such information extracted from “DBA_TAB_COLUMNS”. -
USER_TAB_COL_STATISTICS
displays such information extracted from “USER_TAB_COLUMNS”. This view does not display theOWNER
column.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
Owner of the table |
|
|
|
Name of the table |
|
|
|
Column name |
|
|
|
Number of distinct values in the column |
|
|
|
Low value in the column |
|
|
|
High value in the column |
|
|
|
If a histogram is available on If a histogram is not available on |
|
|
|
Number of NULLs in the column |
|
|
|
Number of buckets in histogram for the column |
|
|
|
Date on which this column was most recently analyzed |
|
|
|
Sample size used in analyzing this column |
|
|
|
|
|
|
|
Indicates whether statistics were entered directly by the user ( |
|
|
|
Describes some additional properties of the statistics. For example:
|
|
|
|
Average length of the column (in bytes) |
|
|
|
Indicates existence/type of histogram:
|
|
|
|
The value is For a global tempoary table, the possible values are:
See Oracle Database PL/SQL Packages and Types Reference for information about using the |
See Also:
-
“DBA_TAB_COL_STATISTICS”
-
“USER_TAB_COL_STATISTICS”
-
“ALL_TAB_COLUMNS”