Re: Add important info about ANALYZE after create Functional Index - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Add important info about ANALYZE after create Functional Index
Date
Msg-id 20201109232720.GA8930@momjian.us
Whole thread Raw
In response to Re: Add important info about ANALYZE after create Functional Index  (Nikolay Samokhvalov <samokhvalov@gmail.com>)
Responses Re: Add important info about ANALYZE after create Functional Index  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
On Tue, Oct 27, 2020 at 12:12:00AM -0700, Nikolay Samokhvalov wrote:
> On Mon, Oct 26, 2020 at 3:08 PM Fabrízio de Royes Mello <
> fabriziomello@gmail.com> wrote:
> 
>     Would be nice if add some information about it into our docs but not sure
>     where. I'm thinking about:
>     - doc/src/sgml/ref/create_index.sgml
>     - doc/src/sgml/maintenance.sgml (routine-reindex)
> 
> 
> Attaching the patches for the docs, one for 11 and older, and another for 12+
> (which have REINDEX CONCURRENTLY not suffering from lack of ANALYZE).
> 
> I still think that automating is the right thing to do but of course, it's a
> much bigger topic that a quick fix dor the docs.

I see REINDEX CONCURRENTLY was fixed in head, but the docs didn't get
updated to mention the need to run ANALYZE or wait for autovacuum before
expression indexes can be fully used by the optimizer.  Instead of
putting this mention in the maintenance section, I thought the CREATE
INDEX page make more sense, since it is more of a usability issue,
rather than "why use expression indexes".  Patch attached, which I plan
to apply to all supported branches.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee


Attachment

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Hybrid Hash/Nested Loop joins and caching results from subplans
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: Add important info about ANALYZE after create Functional Index