Re: Frequetly updated partial index leads to bloat on index for Postresql 11

Поиск
Список
Период
Сортировка
От Tom Dearman
Тема Re: Frequetly updated partial index leads to bloat on index for Postresql 11
Дата
Msg-id F84B8181-F681-407C-ABFF-894791C19B7C@gmail.com
обсуждение исходный текст
Ответ на Frequetly updated partial index leads to bloat on index for Postresql 11  (Tom Dearman <tom.dearman@gmail.com>)
Ответы Re: Frequetly updated partial index leads to bloat on index for Postresql 11  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
We have change autovacuum so that it runs more frequently autovacuum_vacuum_scale_factor=0.035, the reason we have a partial index on the status is that in a table of 300 million entries, only about 100 or so would have status=‘IN_PROGRESS’ so we think this should be a nice small index and many of our queries want to look up with a where clause status=‘IN_PROGRESS’.  In theory it works well, but we get a lot of index bloat as there is a lot of churn on the status value, ie each row starts as IN_PROGRESS and then goes to one of 4 possible completed statuses. 

On 16 Jul 2021, at 15:49, Michael Lewis <mlewis@entrata.com> wrote:

Have you tried setting autovacuum to run quite aggressively, perhaps just on this table? Have you tried an index on the status column only, rather than partial?

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

Предыдущее
От: Michael Lewis
Дата:
Сообщение: Re: Frequetly updated partial index leads to bloat on index for Postresql 11
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Frequetly updated partial index leads to bloat on index for Postresql 11