aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2022-09-02 23:32:19 -0400
committerBruce Momjian <bruce@momjian.us>2022-09-02 23:32:19 -0400
commitadc15f49e68719ed55a2efb3942fcb5c89ed6d5f (patch)
tree534f320a8753da48fb46ab018db0ede44cc0b1bd
parent0f590f0064b3a6f1a7492dcc2370819cda0a12c9 (diff)
downloadpostgresql-adc15f49e68719ed55a2efb3942fcb5c89ed6d5f.tar.gz
postgresql-adc15f49e68719ed55a2efb3942fcb5c89ed6d5f.zip
doc: simplify docs about analyze and inheritance/partitions
Discussion: https://postgr.es/m/YxAqYijOsLzgLQgy@momjian.us Backpatch-through: 10
-rw-r--r--doc/src/sgml/ref/analyze.sgml22
1 files changed, 7 insertions, 15 deletions
diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml
index 4b92362f18b..dbdc3a06961 100644
--- a/doc/src/sgml/ref/analyze.sgml
+++ b/doc/src/sgml/ref/analyze.sgml
@@ -251,12 +251,13 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
</para>
<para>
- If the table being analyzed has one or more children,
- <command>ANALYZE</command> will gather statistics twice: once on the
- rows of the parent table only, and a second time on the rows of the
- parent table with all of its children. This second set of statistics
- is needed when planning queries that traverse the entire inheritance
- tree. The autovacuum daemon, however, will only consider inserts or
+ If the table being analyzed has inheritance children,
+ <command>ANALYZE</command> gathers two sets of statistics: one on the rows
+ of the parent table only, and a second including rows of both the parent
+ table and all of its children. This second set of statistics is needed when
+ planning queries that process the inheritance tree as a whole. The child
+ tables themselves are not individually analyzed in this case.
+ The autovacuum daemon, however, will only consider inserts or
updates on the parent table itself when deciding whether to trigger an
automatic analyze for that table. If that table is rarely inserted into
or updated, the inheritance statistics will not be up to date unless you
@@ -273,15 +274,6 @@ ANALYZE [ VERBOSE ] [ <replaceable class="parameter">table_and_columns</replacea
</para>
<para>
- By contrast, if the table being analyzed has inheritance children,
- <command>ANALYZE</command> gathers two sets of statistics: one on the rows
- of the parent table only, and a second including rows of both the parent
- table and all of its children. This second set of statistics is needed when
- planning queries that process the inheritance tree as a whole. The child
- tables themselves are not individually analyzed in this case.
- </para>
-
- <para>
The autovacuum daemon does not process partitioned tables, nor does it
process inheritance parents if only the children are ever modified.
It is usually necessary to periodically run a manual