]> begriffs open source - ai-pg/blob - full-docs/txt/catalog-pg-statistic-ext-data.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / catalog-pg-statistic-ext-data.txt
1
2 52.53. pg_statistic_ext_data #
3
4    The catalog pg_statistic_ext_data holds data for extended planner
5    statistics defined in pg_statistic_ext. Each row in this catalog
6    corresponds to a statistics object created with CREATE STATISTICS.
7
8    Normally there is one entry, with stxdinherit = false, for each
9    statistics object that has been analyzed. If the table has inheritance
10    children or partitions, a second entry with stxdinherit = true is also
11    created. This row represents the statistics object over the inheritance
12    tree, i.e., statistics for the data you'd see with SELECT * FROM
13    table*, whereas the stxdinherit = false row represents the results of
14    SELECT * FROM ONLY table.
15
16    Like pg_statistic, pg_statistic_ext_data should not be readable by the
17    public, since the contents might be considered sensitive. (Example:
18    most common combinations of values in columns might be quite
19    interesting.) pg_stats_ext is a publicly readable view on
20    pg_statistic_ext_data (after joining with pg_statistic_ext) that only
21    exposes information about tables the current user owns.
22
23    Table 52.53. pg_statistic_ext_data Columns
24
25    Column Type
26
27    Description
28
29    stxoid oid (references pg_statistic_ext.oid)
30
31    Extended statistics object containing the definition for this data
32
33    stxdinherit bool
34
35    If true, the stats include values from child tables, not just the
36    values in the specified relation
37
38    stxdndistinct pg_ndistinct
39
40    N-distinct counts, serialized as pg_ndistinct type
41
42    stxddependencies pg_dependencies
43
44    Functional dependency statistics, serialized as pg_dependencies type
45
46    stxdmcv pg_mcv_list
47
48    MCV (most-common values) list statistics, serialized as pg_mcv_list
49    type
50
51    stxdexpr pg_statistic[]
52
53    Per-expression statistics, serialized as an array of pg_statistic type