Re: Adding skip scan (including MDAM style range skip scan) to nbtree - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Date
Msg-id CAH2-WzmhSe0u1R8xF75Asam6U3t01ZdEE1z7R0C3UMKiUiSTZQ@mail.gmail.com
Whole thread Raw
In response to Re: Adding skip scan (including MDAM style range skip scan) to nbtree  (Tomas Vondra <tomas@vondra.me>)
List pgsql-hackers
On Fri, May 9, 2025 at 1:19 PM Tomas Vondra <tomas@vondra.me> wrote:
> Not sure I understand. Why would it need to scan 85 index pages? There's
> only 100 matching tuples total, spread over the 100 partitions. We'll
> need to scan maybe 1 page per partition.

I was unclear. The thing about 85 leaf pages only applies when
partitioning isn't in use. When it is in use, each individual
partition's index has only one index leaf page. So each individual
index scan is indeed fairly inexpensive, particularly relative to
startup cost/preprocessing cost.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Stepan Neretin
Date:
Subject: Re: [PATCH] Fix references in comments, and sync up heap_page_is_all_visible() with heap_page_prune_and_freeze()
Next
From: Peter Geoghegan
Date:
Subject: Re: Adding skip scan (including MDAM style range skip scan) to nbtree