Re: Streaming read-ready sequential scan code - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Streaming read-ready sequential scan code
Date
Msg-id 3b0f3701-addd-4629-9257-cf28e1a6e6a1@iki.fi
Whole thread Raw
In response to Re: Streaming read-ready sequential scan code  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: Streaming read-ready sequential scan code
List pgsql-hackers
On 01/04/2024 22:58, Melanie Plageman wrote:
> Attached v7 has version 14 of the streaming read API as well as a few
> small tweaks to comments and code.

I saw benchmarks in this thread to show that there's no regression when 
the data is in cache, but I didn't see any benchmarks demonstrating the 
benefit of this. So I ran this quick test:

-- create table ~1 GB table with only 1 row per page.
CREATE TABLE giga (i int, filler text) with (fillfactor=10);
insert into giga select g, repeat('x', 900) from generate_series(1, 
140000) g;
vacuum freeze giga;

\timing on
select count(*) from giga;

The SELECT takes about 390 ms on 'master', and 230 ms with the patch.

This is pretty much the best case for this patch, real world gains will 
be much smaller. Nevertheless, nice speedup!

-- 
Heikki Linnakangas
Neon (https://neon.tech)




pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Statistics Import and Export
Next
From: Melanie Plageman
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum