public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrei Lepikhov <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Postgres hackers <[email protected]>
Cc: Xuneng Zhou <[email protected]>
Cc: Chao Li <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Kirill Reshke <[email protected]>
Cc: Peter Smith <[email protected]>
Subject: Re: Sequence Access Methods, round two
Date: Tue, 19 May 2026 15:11:36 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 18/05/2026 20:42, Andrei Lepikhov wrote:
> On 18/05/2026 00:43, Michael Paquier wrote:
> Ok. So let me just leave the idea of avoiding unnecessary cache lookups here.
Here is my benchmark results.
Test script:
DROP SEQUENCE IF EXISTS abc;
CREATE UNLOGGED SEQUENCE abc USING seqlocal;
-- Warm up
SELECT count(nextval('abc')) FROM generate_series(1, 1E6) \watch i=0 c=100
\timing on
\o result.txt
-- Benchmark
SELECT count(nextval('abc')) FROM generate_series(1, 1E6) \watch i=0 c=100
To identify thermal impact I averaged and compared results per 20 iterations in
a pack:
| Window | Baseline | v29 |
| ----------- | -------- | ------------ |
| iter 1-20 | 236.92 | 235.28 |
| iter 21-40 | 235.77 | 236.17 |
| iter 41-60 | 238.53 | 234.64 |
| iter 61-80 | 236.62 | 234.35 |
| iter 81-100 | 237.13 | 235.24 |
This test doesn't include insertion machinery itself, so no cold cache measures
or sequence lock contention.
pgbench results on the UNLOGGED table insertion shows the following:
| Test | Baseline | v29 | Δ |
| INSERT pgbench (mean tps) | 24,997 | 25,195 | +0.79% |
My oldish Intel-based MacBook is probably not sensitive enough to detect the
overhead. So, you can recheck the result using scripts [1] to restore the exact
test.
[1] https://github.com/danolivo/conf/tree/main/2026e-SeqAM
--
regards, Andrei Lepikhov,
pgEdge
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Sequence Access Methods, round two
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox