diff options
author | Bruce Momjian <bruce@momjian.us> | 2020-11-12 15:00:43 -0500 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2020-11-12 15:00:43 -0500 |
commit | 3284fe452112c9f15975ebccc73c168ed6892d4f (patch) | |
tree | 3b446e62b496dfa94d205a04d10781efb89d5d46 | |
parent | fea2b70dd4deccb2c803d94493a164097b0af662 (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
-rw-r--r-- | doc/src/sgml/ref/create_index.sgml | 10 |
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 2ef7d8929d5..94e45d1db63 100644 --- a/doc/src/sgml/ref/create_index.sgml +++ b/doc/src/sgml/ref/create_index.sgml @@ -569,6 +569,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 |