aboutsummaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/analyze.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/sgml/ref/analyze.sgml')
-rw-r--r--doc/src/sgml/ref/analyze.sgml15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml
index d5f2528eb96..7545fa5d869 100644
--- a/doc/src/sgml/ref/analyze.sgml
+++ b/doc/src/sgml/ref/analyze.sgml
@@ -102,8 +102,9 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re
just after making major changes in the contents of a table. Accurate
statistics will help the planner to choose the most appropriate query
plan, and thereby improve the speed of query processing. A common
- strategy is to run <xref linkend="sql-vacuum">
+ strategy for read-mostly databases is to run <xref linkend="sql-vacuum">
and <command>ANALYZE</command> once a day during a low-usage time of day.
+ (This will not be sufficient if there is heavy update activity.)
</para>
<para>
@@ -181,11 +182,13 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re
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. The autovacuum daemon, however,
- will only consider inserts or updates on the parent table when deciding
- whether to trigger an automatic analyze. If that table is rarely
- inserted into or updated, the inheritance statistics will not be up to date
- unless you run <command>ANALYZE</command> manually.
+ 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
+ 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
+ run <command>ANALYZE</command> manually.
</para>
</refsect1>