PG_STATS
PG_STATS provides access to the single-column statistics stored in the pg_statistic table. The autovacuum_naptime parameter specifies the interval for updating statistics recorded in the view.
Name |
Type |
Reference |
Description |
---|---|---|---|
schemaname |
name |
PG_NAMESPACE.nspname |
Name of the schema that contains a table |
tablename |
name |
PG_CLASS.relname |
Table name |
attname |
name |
PG_ATTRIBUTE.attname |
Column name |
inherited |
boolean |
- |
Includes inherited sub-columns if the value is true; otherwise, it indicates the column in a specified table. |
null_frac |
real |
- |
Percentage of column entries that are null |
avg_width |
integer |
- |
Average width in bytes of column's entries |
n_distinct |
real |
- |
|
n_dndistinct |
real |
- |
Number of unique non-null data values in the dn1 column
|
most_common_vals |
anyarray |
- |
List of the most common values in a column. (NULL if no values in the column seem to be more common than any others) |
most_common_freqs |
real[] |
- |
List of the frequencies of the most common values, that is, number of occurrences of each divided by total number of rows. (NULL if most_common_vals is NULL) |
histogram_bounds |
anyarray |
- |
List of values that divide the column's values into groups of equal proportion. The values in most_common_vals, if present, are omitted from this histogram calculation. This column is null if the column data type does not have a < operator or if the most_common_vals list accounts for the entire population. |
correlation |
real |
- |
Statistical correlation between physical row ordering and logical ordering of the column values. It ranges from -1 to +1. When the value is near to -1 or +1, an index scan on the column is estimated to be cheaper than when it is near to zero, due to reduction of random access to the disk. This column is null if the column data type does not have a < operator. |
most_common_elems |
anyarray |
- |
A list of non-null element values most often appearing |
most_common_elem_freqs |
real[] |
- |
A list of the frequencies of the most common element values |
elem_count_histogram |
real[] |
- |
A histogram of the counts of distinct non-null element values |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot