On Fri, Jul 3, 2026 at 2:19 PM Amit Langote <[email protected]> wrote:
> Performance (meson release builds, master vs patched, pg_prewarm'd
> table, vacuum-frozen for the all-visible rows; median ms over the
> 1M..10M row sizes, ranges across two runs):
>
>                               all-visible      not-all-visible
>   count(*)  (no qual)         -35% to -43%     -21% to -31%
>   count(*) WHERE pass-all     -17% to -23%     -14% to -16%
>   count(*) WHERE pass-none    -15% to -20%     -13% to -18%
>
> The win is largest where per-tuple scan overhead dominates -- no qual,
> and all-visible pages where the visibility check is cheap -- and
> proportionally smaller as qual evaluation (unchanged by this series)
> is added.  Two runs agree to within a couple of points at 5M and 10M;
> the 1-2M figures are noisier on my machine, so the larger sizes are
> the ones to trust.

Looks like I got my benchmark table mixed up: those figures were
actually from SELECT * over a full scan (forced with LIMIT 1 OFFSET
N), not count(*) as the labels say, so they included per-row
projection and overstate the improvement for a plain count(*).
Re-running with count(*), same tables, prewarmed, master vs patched:

all-visible not-all-visible
count(*) (no qual) -20% to -21% -12% to -20%
count(*) WHERE pass-all -9% -8% to -12%
count(*) WHERE pass-none -17% -14% to -20%

(5M and 10M rows, where run-to-run variance is under a couple of
percent; the 1-2M figures are noisier on my machine. The all-visible
numbers are nearly flat across sizes, hence the single values.)

-- 
Thanks, Amit Langote


Reply via email to