Re: Add important info about ANALYZE after create Functional Index

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Add important info about ANALYZE after create Functional Index
Дата
Msg-id 20201028185211.ipicbsfjsztmv6u2@development
обсуждение исходный текст
Ответ на 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:
>On Mon, Oct 26, 2020 at 7:46 PM David G. Johnston <
>david.g.johnston@gmail.com> wrote:
>>
>> It would seem preferable to call the lack of auto-analyzing after these
>operations a bug and back-patch a fix that injects an analyze side-effect
>just before their completion.  It doesn't have to be smart either,
>analyzing things even if the created (or newly validated) index doesn't
>have statistics of its own isn't a problem in my book.
>>
>
>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.
>

I think the problem is we notice when a table has not been analyzed yet
(and trigger an analyze), but we won't notice that for an index. So if
the table does not change very often, it may take ages before we build
stats for the index - not great.


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: duplicate function oid symbols
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Add important info about ANALYZE after create Functional Index