Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 05a719c

Browse filesBrowse 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 86913ba commit 05a719c
Copy full SHA for 05a719c

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎doc/src/sgml/ref/create_index.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/ref/create_index.sgml
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,16 @@ Indexes:
568568
sort high</>, in queries that depend on indexes to avoid sorting steps.
569569
</para>
570570

571+
<para>
572+
The regularly system collects statistics on all of a table's
573+
columns. Newly-created non-expression indexes can immediately
574+
use these statistics to determine an index's usefulness.
575+
For new expression indexes, it is necessary to run <link
576+
linkend="sql-analyze"><command>ANALYZE</command></link> or wait for
577+
the <link linkend="autovacuum">autovacuum daemon</link> to analyze
578+
the table to generate statistics about new expression indexes.
579+
</para>
580+
571581
<para>
572582
For most index methods, the speed of creating an index is
573583
dependent on the setting of <xref linkend="guc-maintenance-work-mem">.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.