pg_stats is a publicly readable view on
pg_statistic that only exposes information about those tables that are readable by the current user. The
pg_stats view presents the contents of
pg_statistic in a friendlier format.
All the statistical data is inherently approximate, even assuming that it is up-to-date. The
pg_stats schema must be extended whenever new slot types are defined.
|schemaname||name||pg_namespace.nspname.||The name of the schema containing the table.|
|tablename||name||pg_class.relname||The name of the table.|
|attname||name||pg_attribute.attname||The name of the column this row describes.|
|null_frac||real||The fraction of column entries that are null.|
|avg_width||integer||The average storage width in bytes of the column’s entries, calculated as
|n_distinct||real||A positive number is an estimate of the number of distinct values in the column; the number is not expected to vary with the number of rows. A negative value is the number of distinct values divided by the number of rows, that is, the ratio of rows with distinct values for the column, negated. This form is used when the number of distinct values increases with the number of rows. A unique column, for example, has an
|most_common-vals||anyarray||An array containing the most common values in the column, or null if no values seem to be more common. If the
|most_common_freqs||real||An array containing the frequencies of the values in the
|histogram_bounds||anyarray||An array of values that divide the column values into groups of approximately the same size. A histogram can be defined only if there is a
|correlation||real||HAWQ does not calculate the correlation statistic.|