summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/analyze.sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-09-28 19:39:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-09-28 19:39:54 -0400
commita32dd16459ae8fbc1e09607d7ed960b3dcce7dba (patch)
tree2e038ab38337fde2232c8c2811b9f14dfd00d408 /doc/src/sgml/ref/analyze.sgml
parentcc4ff8742b99d3b20a52f529d03bbe802f4b0053 (diff)
Update and extend the EXPLAIN-related documentation.
I've made a significant effort at filling in the "Using EXPLAIN" section to be reasonably complete about mentioning everything that EXPLAIN can output, including the "Rows Removed" outputs that were added by Marko Tiikkaja's recent documentation-free patch. I also updated the examples to be consistent with current behavior; several of them were not close to what the current code will do. No doubt there's more that can be done here, but I'm out of patience for today.
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>