51.51. pg_statistic_ext

The catalog pg_statistic_ext holds definitions of extended planner statistics. Each row in this catalog corresponds to a statistics object created with CREATE STATISTICS.

Table 51.51. pg_statistic_ext Columns

NameTypeReferencesDescription
stxrelidoidpg_class.oidTable containing the columns described by this object
stxnamename Name of the statistics object
stxnamespaceoidpg_namespace.oid The OID of the namespace that contains this statistics object
stxowneroidpg_authid.oidOwner of the statistics object
stxkeysint2vectorpg_attribute.attnum An array of attribute numbers, indicating which table columns are covered by this statistics object; for example a value of 1 3 would mean that the first and the third table columns are covered
stxkindchar[]  An array containing codes for the enabled statistic kinds; valid values are: d for n-distinct statistics, f for functional dependency statistics, and m for most common values (MCV) list statistics

The stxkind field is filled at creation of the statistics object, indicating which statistic type(s) are desired. The statistics (once computed by ANALYZE) are stored in pg_statistic_ext_data catalog.