Re: Add important info about ANALYZE after create Functional Index

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Re: Add important info about ANALYZE after create Functional Index
Дата
Msg-id CAFcNs+qgLOZWJ=iugTME-UqcLOmGLVS_ioPpvGS87mJ=j8oLZw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add important info about ANALYZE after create Functional Index  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: Add important info about ANALYZE after create Functional Index  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers

On Wed, Oct 28, 2020 at 4:35 PM Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
>
> I don't think anyone proposed to do this through autovacuum. There was a
> reference to auto-analyze but I think that was meant as 'run analyze
> automatically.' Which would work in transactions just fine, I think.
>

Maybe I was not very clear at the beginning so will try to clarify my thoughts:

1) We should add notes on our docs about the need to issue ANALYZE after creating indexes using expressions and create extended statistics. Nikolay sent a patch upthread and we can work on it and back patch.

2) REINDEX CONCURRENTLY does not keep statistics (pg_statistc) like a regular REINDEX for indexes using expressions and to me it's a bug. Michael pointed out upthread that maybe we should rework a bit  index_concurrently_swap() to copy statistics from old index to new one.


> But I agree it'd likely be a more complicated patch than it might seem
> at first glance.
>

If we think about a way to kick AutoAnalyze for sure it will be a more complicated task but IMHO for now we can do it simply just by copying statistics like I mentioned above.

Regards,

--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Disable WAL logging to speed up data loading
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Add important info about ANALYZE after create Functional Index