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