mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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.
This commit is contained in:
@@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user