Re: Add important info about ANALYZE after create Functional Index

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add important info about ANALYZE after create Functional Index
Дата
Msg-id 20201028051455.GH28445@paquier.xyz
обсуждение исходный текст
Ответ на Re: Add important info about ANALYZE after create Functional Index  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Ответы Re: Add important info about ANALYZE after create Functional Index  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Список pgsql-hackers
On Tue, Oct 27, 2020 at 11:06:22AM -0300, Fabrízio de Royes Mello wrote:
> When we create a new table or index they will not have statistics until an
> ANALYZE happens. This is the default behaviour and I think is not a big
> problem here, but we need to add some note on docs about the need of
> statistics for indexes on expressions.
>
> But IMHO there is a misbehaviour with the implementation of CONCURRENTLY on
> REINDEX because running it will lose the statistics. Have a look the
> example below:
>
> [...]
>
> So IMHO here is the place we should rework a bit to execute ANALYZE as a
> last step.

I agree that this is not user-friendly, and I suspect that we will
need to do something within index_concurrently_swap() to fill in the
stats of the new index from the data of the old one (not looked at
that in details yet).
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Online checksums verification in the backend
Следующее
От: Peter Smith
Дата:
Сообщение: Re: [HACKERS] logical decoding of two-phase transactions