Re: when do I analyze after concurrent index creation?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: when do I analyze after concurrent index creation?
Дата
Msg-id 8902.1382110970@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: when do I analyze after concurrent index creation?  (dinesh kumar <dineshkumar02@gmail.com>)
Ответы Re: when do I analyze after concurrent index creation?
Re: when do I analyze after concurrent index creation?
Список pgsql-general
dinesh kumar <dineshkumar02@gmail.com> writes:
> When we create an index, i believe the postgres engine it self update it's
> catalog about the index availability.

ANALYZE normally collects statistics about the contents of table columns.
Thus, adding (or removing) an index does not create any reason to
re-ANALYZE.

However ... if you have an index on an expression (not just a simple
column value), that cues ANALYZE to collect statistics about the values of
that expression.  So re-analyzing is useful after creating such an index,
to give the planner a better idea of when to use that index.

Whether you used CREATE INDEX CONCURRENTLY or some other way of creating
the index doesn't matter at all.

            regards, tom lane


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

Предыдущее
От: dinesh kumar
Дата:
Сообщение: Re: when do I analyze after concurrent index creation?
Следующее
От: Svetlin Manavski
Дата:
Сообщение: Re: Idle transactions in PostgreSQL 9.2.4