Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches
Дата
Msg-id DC283F75-96B6-4BD6-844F-D0B1A47666E6@thebuild.com
обсуждение исходный текст
Ответ на Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches  (Dimitrios Apostolou <jimis@gmx.net>)
Список pgsql-general

> On Jan 31, 2023, at 07:40, Dimitrios Apostolou <jimis@gmx.net> wrote:
> Is this bloat even affecting queries that do not use the index?

No, but a bloated index often (although not always) goes along with a bloated table.

> It seems I have to add VACUUM FULL to nightly maintainance.

I wouldn't go that far; that's basically changing your oil every time you get gas.  However, monitoring bloat and
eitherrebuilding the indexes (if they're all that's bloated) or using pg_repack [1] periodically is a good practice. 

[1] https://github.com/reorg/pg_repack


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

Предыдущее
От: Dimitrios Apostolou
Дата:
Сообщение: Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches