Re: When manual analyze is needed

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: When manual analyze is needed
Дата
Msg-id b7aeea8a2f84a11b330137bf8849a0fc1e88ffee.camel@cybertec.at
обсуждение исходный текст
Ответ на When manual analyze is needed  (veem v <veema0000@gmail.com>)
Ответы Re: When manual analyze is needed
Re: When manual analyze is needed
Список pgsql-general
On Mon, 2024-03-04 at 01:33 +0530, veem v wrote:
> We see in one of the RDS postgres instances, from pg_stat_user_tables ,
> the auto vacuum and auto analyze happening on the tables without our
> manual intervention.

That's exactly the idea behind autovacuum.


> So is auto vacuum analyze is sufficient  to make sure optimal stats
> and unbloated table structure in place

Yes, it is sufficient.  If you have a busy database, you may have to
tune autovacuum to keep up.

The only things that require manual ANALYZE are

1. partitioned tables (autoanalyze will collect statistics on the
   partitions, but not the partitioned table itself)

2. after you create an index on an expression (otherwise you have to
   wait until autoanalyze runs to get statistics on the indexed
   expression)

Yours,
Laurenz Albe



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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Orphan files filling root partition after crash
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Guarantees/Semantics of pg_stats