summaryrefslogtreecommitdiff
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.sgml13
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml
index 418082e6d93..c0d2673dc50 100644
--- a/doc/src/sgml/ref/analyze.sgml
+++ b/doc/src/sgml/ref/analyze.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/analyze.sgml,v 1.25 2008/12/13 19:13:44 tgl Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/analyze.sgml,v 1.26 2009/08/02 22:14:51 tgl Exp $
PostgreSQL documentation
-->
@@ -165,6 +165,17 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re
the target causes a proportional increase in the time and space needed
to do <command>ANALYZE</command>.
</para>
+
+ <para>
+ One of the values estimated by <command>ANALYZE</command> is the number of
+ distinct values that appear in each column. Because only a subset of the
+ rows are examined, this estimate can sometimes be quite inaccurate, even
+ with the largest possible statistics target. If this inaccuracy leads to
+ bad query plans, a more accurate value can be determined manually and then
+ installed with
+ <command>ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT</>
+ (see <xref linkend="sql-altertable" endterm="sql-altertable-title">).
+ </para>
</refsect1>
<refsect1>