Re: VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)
Дата
Msg-id 1402526.1675277762@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: VACUUM vs VACUUM FULL (was: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches)  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-general
Christophe Pettus <xof@thebuild.com> writes:
>> On Feb 1, 2023, at 10:45, David G. Johnston <david.g.johnston@gmail.com> wrote:
>> The system just isn't that intelligent for "sequential scan", instead it does literally what the label says, goes
throughthe table one page at a time and returns any live rows it finds.  

> Although this does raise a question: Couldn't it skip pages that are marked appropriately in the visibility map?

There's no bit in the visibility map for "contains no live tuples".
I think adding one would be optimizing for the wrong thing.

(You might be thinking of the free-space map, but we don't maintain
that rigorously enough to trust it as a guide to skipping pages.)

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Best Open Source OS for Postgresql
Следующее
От: Ron
Дата:
Сообщение: "SELECT FROM foo" acts like "SELECT COUNT(*) FROM foo"?