From: Bruce Momjian Date: Thu, 12 Nov 2020 20:00:43 +0000 (-0500) Subject: docs: mention that expression indexes need analyze X-Git-Tag: REL9_5_25~71 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=3284fe452112c9f15975ebccc73c168ed6892d4f;p=postgresql.git 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 --- 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 @@ -568,6 +568,16 @@ Indexes: sort high, in queries that depend on indexes to avoid sorting steps. + + 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 ANALYZE or wait for + the autovacuum daemon to analyze + the table to generate statistics about new expression indexes. + + For most index methods, the speed of creating an index is dependent on the setting of .