GaussDB-DB_TAB_COL_STATISTICS
DB_TAB_COL_STATISTICS displays column statistics and histogram information extracted from DB_TAB_COLUMNS. All users can access this view. This view exists in the PG_CATALOG and SYS schemas.
| Name | Type | Description |
|---|---|---|
| owner | character varying(128) | Table owner. |
| table_name | character varying(128) | Table name. |
| column_name | character varying(128) | Column name. |
| num_distinct | numeric | Number of different values in a column. |
| low_value | raw | Low value in a column. |
| high_value | raw | High value in a column. |
| density | numeric | - If there is a histogram on COLUMN_NAME, this column displays the selectivity of values in the histogram that span fewer than two endpoints. It does not represent the selectivity of values that span two or more endpoints. |
- If no histogram is available on COLUMN_NAME, the value of this column is 1/NUM_DISTINCT. | | num_nulls | numeric | Number of empty values in a column. | | num_buckets | numeric | Number of buckets in the histogram of a column. | | sample_size | numeric | Sample size used to analyze a column. | | last_analyzed | timestamp(0) without time zone | Date when a column was last analyzed. Database restart is not supported. Otherwise, data loss will occur. | | global_stats | character varying(3) | Not supported. Its value is NULL. | | user_stats | character varying(3) | Not supported. Its value is NULL. | | notes | character varying(99) | Not supported. Its value is NULL. | | avg_col_len | numeric | Average length of a column, in bytes. | | histogram | character varying(15) | Specifies whether the histogram exists and the type of the histogram.- NONE: no histogram.
- FREQUENCY: frequency histogram.
- EQUI-WIDTH: equal-width histogram. | | scope | character varying(7) | For statistics collected on any table other than global temporary tables, the value is SHARED (indicating that the statistics are shared among all sessions). | | schema | character varying(64) | Name of the namespace to which the column belongs. |
更多详情请参考GaussDB 文档中心:doc.hcs.huawei.com/db/zh-cn/ga…