From: | Claudio Freire <klaussfreire(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-Dev <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location |
Date: | 2016-11-19 01:27:10 |
Message-ID: | CAGTBQpbyfQGSGzEnUUe7OZMXrywrG2AoDAm86_OBZxwANyfQMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Nov 18, 2016 at 10:05 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Thu, Aug 18, 2016 at 2:15 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
>> I think that this is a bad idea. We need to implement suffix
>> truncation of internal page index tuples at some point, to make them
>> contain less information from the original leaf page index tuple.
>> That's an important optimization, because it increases fan-in. This
>> seems like a move in the opposite direction.
>
> Maybe I was too hasty, here. Can you rebase this patch, Claudio?
I've been changing the on-disk format considerably, to one that makes
more sense.
I haven't posted it because it still doesn't have suffix (and prefix)
truncation, but it should be compatible with it (ie: it could be
implemented as an optimization that doesn't change the on-disk
format).
However, I haven't tested the current state of the patch thoroughly.
If a WIP is fine, I can post the what I have, rebased.
> It's possible that this idea could have further non-obvious benefits.
> I see some potential for this to help with nbtree page deletion, item
> recycling, etc. For example, maybe VACUUM can manage to do something
> much closer to a regular index scan when that seems to make sense --
That was on my mind too
> I also think that this might help with bitmap index scans.
How so?
AFAIK it helps regular scans on low-cardinality indexes more than
bitmap index scans. With low cardinality indexes, the resulting heap
access pattern will be an unordered series of sequential range scans,
which is better than the fully random scan the current layout causes.
Bitmap index scans, however, deny that benefit.
From | Date | Subject | |
---|---|---|---|
Next Message | Euler Taveira | 2016-11-19 02:04:20 | Re: pg_recvlogical --endpos |
Previous Message | Craig Ringer | 2016-11-19 01:23:43 | Re: Patch: Implement failover on libpq connect level. |