public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andres Freund <[email protected]>
To: Andrey Borodin <[email protected]>
Cc: Aliaksandr Kalenik <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] sort leaf pages by ctid for gist indexes built using sorted method
Date: Mon, 21 Mar 2022 18:23:07 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAHqSB9gd0NnQuPHSnnR7BC-rNnJWZ53rRA+vYZF4pcRK-4y_kw@mail.gmail.com>
	<[email protected]>

Hi,

On 2021-12-16 14:49:25 +0500, Andrey Borodin wrote:
> 
> > With the current implementation, for GiST indexes created by doing multiple inserts, index tuples match heap tuples order, but it doesn't work that way for sorted method where index tuples on all levels are ordered using comparator provided in sortsupport (z-order for geometry type, for example). This means two tuples that are on the same heap page can be far apart from one another on an index page, and the heap page may be read twice and prefetch performance will degrade.
> > 
> > I've created a patch intended to improve that by sorting index tuples by heap tuples TID order on leaf pages.
> 
> Thanks you for the patch. The code looks nice and clean.

The patch fails currently doesn't apply: http://cfbot.cputube.org/patch_37_3454.log


> But can we have some benchmarks showing that this optimization really helps?

As there hasn't been a response to this even in the last CF, I'm going to mark
this entry as returned with feedback (IMO shouldn't even have been moved to
this CF).

Greetings,

Andres Freund






view thread (2+ messages)

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]
  Subject: Re: [PATCH] sort leaf pages by ctid for gist indexes built using sorted method
  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