Re: btree: downlink right separator/HIKEY optimization

2024-03-11 Thread Matthias van de Meent
On Fri, 8 Mar 2024 at 20:14, Peter Geoghegan wrote: > > On Thu, Feb 22, 2024 at 10:42 AM Matthias van de Meent > wrote: > > I forgot to address this in the previous patch, so here's v3 which > > fixes the issue warning. > > What benchmarking have you done here? I have benchmarked this atop

Re: btree: downlink right separator/HIKEY optimization

2024-03-08 Thread Peter Geoghegan
On Fri, Mar 8, 2024 at 2:14 PM Peter Geoghegan wrote: > What benchmarking have you done here? I think that the memcmp() test is subtly wrong: > + if (PointerIsValid(rightsep)) > + { > + /* > +* Note: we're not in the rightmost page (see branchpoint earlier >

Re: btree: downlink right separator/HIKEY optimization

2024-03-08 Thread Peter Geoghegan
On Thu, Feb 22, 2024 at 10:42 AM Matthias van de Meent wrote: > I forgot to address this in the previous patch, so here's v3 which > fixes the issue warning. What benchmarking have you done here? Have you tried just reordering things in _bt_search() instead? If we delay the check until after

Re: btree: downlink right separator/HIKEY optimization

2024-02-22 Thread Matthias van de Meent
On Sat, 6 Jan 2024 at 16:40, vignesh C wrote: > > CFBot shows the following compilation error at [1]: > [16:56:22.153] FAILED: > src/backend/postgres_lib.a.p/access_nbtree_nbtsearch.c.obj > [...] > ../src/backend/access/nbtree/nbtsearch.c > [16:56:22.153]

Re: btree: downlink right separator/HIKEY optimization

2024-02-22 Thread Matthias van de Meent
On Tue, 5 Dec 2023 at 08:43, Heikki Linnakangas wrote: > > On 01/11/2023 00:08, Matthias van de Meent wrote: > > By caching the right separator index tuple in _bt_search, we can > > compare the downlink's right separator and the HIKEY, and when they > > are equal (memcmp() == 0) we don't have to

Re: btree: downlink right separator/HIKEY optimization

2024-01-06 Thread vignesh C
On Wed, 1 Nov 2023 at 03:38, Matthias van de Meent wrote: > > (now really to -hackers) > Hi, > > Over at [0] I'd implemented an optimization that allows us to skip > calling _bt_compare in _bt_moveright in many common cases. This patch, > when stacked on top of the prefix truncation patch,

Re: btree: downlink right separator/HIKEY optimization

2023-12-04 Thread Heikki Linnakangas
On 01/11/2023 00:08, Matthias van de Meent wrote: calling _bt_compare in _bt_moveright in many common cases. This patch, when stacked on top of the prefix truncation patch, improves INSERT performance by an additional 2-9%pt, with an extreme case of 45% in the worscase index tests at [0]. The

btree: downlink right separator/HIKEY optimization

2023-10-31 Thread Matthias van de Meent
(now really to -hackers) Hi, Over at [0] I'd implemented an optimization that allows us to skip calling _bt_compare in _bt_moveright in many common cases. This patch, when stacked on top of the prefix truncation patch, improves INSERT performance by an additional 2-9%pt, with an extreme case of