summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2020-11-12 15:00:44 -0500
committerBruce Momjian <bruce@momjian.us>2020-11-12 15:00:44 -0500
commit64ac51a1791fa2059c843e5e5533fb7c70bda699 (patch)
tree44624fcea8b0d33e76efe66bb022a8eea19b94c0 /doc/src
parentfe904ac20bd042edf05cc450541cdcd811d4137d (diff)
docs: mention that expression indexes need analyze
Expression indexes can't benefit from pre-computed statistics on columns. Reported-by: Nikolay Samokhvalov Discussion: https://postgr.es/m/CANNMO++5rw9RDA=p40iMVbMNPaW6O=S0AFzTU=KpYHRpCd1voA@mail.gmail.com Author: Nikolay Samokhvalov, modified Backpatch-through: 9.5
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/create_index.sgml10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index dc4b645452a..fb1ecb9ff6a 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -566,6 +566,16 @@ Indexes:
</para>
<para>
+ The regularly system collects statistics on all of a table's
+ columns. Newly-created non-expression indexes can immediately
+ use these statistics to determine an index's usefulness.
+ For new expression indexes, it is necessary to run <link
+ linkend="sql-analyze"><command>ANALYZE</command></link> or wait for
+ the <link linkend="autovacuum">autovacuum daemon</link> to analyze
+ the table to generate statistics about new expression indexes.
+ </para>
+
+ <para>
For most index methods, the speed of creating an index is
dependent on the setting of <xref linkend="guc-maintenance-work-mem">.
Larger values will reduce the time needed for index creation, so long