Document autoanalyze limitations for partitioned tables
authorTomas Vondra <[email protected]>
Mon, 28 Mar 2022 12:27:36 +0000 (14:27 +0200)
committerTomas Vondra <[email protected]>
Mon, 28 Mar 2022 12:34:35 +0000 (14:34 +0200)
commitc1e9cfaef9759442dde94f23275b4969b0a631b7
treefda83390b084a11fed045bf6b078f2406ceaef73
parentab80b0fbbbc4ab3e6a2d14407d1e57757adff6fb
Document autoanalyze limitations for partitioned tables

When dealing with partitioned tables, counters for partitioned tables
are not updated when modifying child tables. This means autoanalyze may
not update optimizer statistics for the parent relations, which can
result in poor plans for some queries.

It's worth documenting this limitation, so that people are aware of it
and can take steps to mitigate it (e.g. by setting up a script executing
ANALYZE regularly).

Backpatch to v10. Older branches are affected too, of couse, but we no
longer maintain those.

Author: Justin Pryzby
Reviewed-by: Zhihong Yu, Tomas Vondra
Backpatch-through: 10
Discussion: https://postgr.es/m/20210913035409.GA10647%40telsasoft.com
doc/src/sgml/maintenance.sgml
doc/src/sgml/ref/analyze.sgml