Skip to content

Commit 3370207

Browse files
committed
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
1 parent 66a8f09 commit 3370207

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/src/sgml/ref/create_index.sgml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,16 @@ Indexes:
745745
sort high</quote>, in queries that depend on indexes to avoid sorting steps.
746746
</para>
747747

748+
<para>
749+
The regularly system collects statistics on all of a table's
750+
columns. Newly-created non-expression indexes can immediately
751+
use these statistics to determine an index's usefulness.
752+
For new expression indexes, it is necessary to run <link
753+
linkend="sql-analyze"><command>ANALYZE</command></link> or wait for
754+
the <link linkend="autovacuum">autovacuum daemon</link> to analyze
755+
the table to generate statistics about new expression indexes.
756+
</para>
757+
748758
<para>
749759
For most index methods, the speed of creating an index is
750760
dependent on the setting of <xref linkend="guc-maintenance-work-mem"/>.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy