Re: update non-indexed value is slow if some non-related index/fk are enabled

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: update non-indexed value is slow if some non-related index/fk are enabled
Дата
Msg-id CAKFQuwZbx8v9Ect=FDk34FhJdCDw3ekQ=vDcKW==XaNTCiF5Cg@mail.gmail.com
обсуждение исходный текст
Ответ на update non-indexed value is slow if some non-related index/fk are enabled  (Philippe Doussot <philippe.doussot@up.coop>)
Ответы Re: update non-indexed value is slow if some non-related index/fk are enabled  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Friday, September 3, 2021, Philippe Doussot <philippe.doussot@up.coop> wrote:

One UPDATE of one boolean value which is non-indexed take some time ( for many tuples .. 3 Millions ).

But if we disable all indexes/fk the UPDATE is 10x faster and do 10x less shared hit .

I don't understand why disabling all index from the table speed up the update because the boolean column is not indexed


Index entries point to physical records.  You just deleted one physical record and added another.  The indexes need to be updated with that information.

David J.

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

Предыдущее
От: Richard Michael
Дата:
Сообщение: How to observe plan_cache_mode transition from custom to generic plan?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: update non-indexed value is slow if some non-related index/fk are enabled