From: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
---|---|
To: | Soumyadeep Chakraborty <soumyadeep2007(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Ashwin Agrawal <ashwinstar(at)gmail(dot)com> |
Subject: | Re: brininsert optimization opportunity |
Date: | 2023-11-03 18:35:26 |
Message-ID: | 1d68ef1d-41c5-7159-c6c0-b44dad4e3148@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I took a look at this patch today. I had to rebase the patch, due to
some minor bitrot related to 9f0602539d (but nothing major). I also did
a couple tiny cosmetic tweaks, but other than that the patch seems OK.
See the attached v6.
I did some simple performance tests too, similar to those in the initial
message:
CREATE UNLOGGED TABLE heap (i int);
CREATE INDEX ON heap USING brin(i) WITH (pages_per_range=1);
--
TRUNCATE heap;
INSERT INTO heap SELECT 1 FROM generate_series(1, 20000000);
And the results look like this (5 runs each):
master: 16448.338 16066.473 16039.166 16067.420 16080.066
patched: 13260.065 13229.800 13254.454 13265.479 13273.693
So that's a nice improvement, even though enabling WAL will make the
relative speedup somewhat smaller.
The one thing I'm not entirely sure about is adding new stuff to the
IndexAmRoutine. I don't think we want to end up with too many callbacks
that all AMs have to initialize etc. I can't think of a different/better
way to do this, though.
Barring objections, I'll try to push this early next week, after another
round of cleanup.
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
v6-0001-Reuse-revmap-and-brin-desc-in-brininsert.patch | text/x-patch | 13.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2023-11-03 18:42:55 | Re: Pre-proposal: unicode normalized text |
Previous Message | Christoph Berg | 2023-11-03 18:19:17 | Re: meson documentation build open issues |