Re: Fast insertion indexes: why no developments - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Fast insertion indexes: why no developments
Date
Msg-id CAM-w4HMEd56iDYfJKNXeROxukK=VhQkpRwfnNoQdk3m_G5svMg@mail.gmail.com
Whole thread
In response to Re: Fast insertion indexes: why no developments  (Claudio Freire <klaussfreire@gmail.com>)
Responses Re: Fast insertion indexes: why no developments
List pgsql-hackers

On Tue, Nov 5, 2013 at 5:30 PM, Claudio Freire <klaussfreire@gmail.com> wrote:
> Maybe there's value in minmax indexes for sequential data, but not for
> random data, which is the topic of this thread.


Well, of course, they're not magic pixie dust.

But is your data really random? (or normal?)

I think minmax indexes are more akin to bitmap indexes. They will be very effective for columns with low-cardinality, especially for columns that are very clustered. In the extreme if all the values in some regions of the table are the same then minmax indexes would be optimal. I wouldn't expect them to be very effective for a highly selective column that isn't well clustered.

It really sounds like you're describing a particular workload that btrees could just be more optimized for. Buffering all inserts in memory and merging them into the btree lazily is actually something Heikki has proposed in the past. I'm not clear if that gets you all the benefits of the indexes you described or not but it seems to target the particular problem you're having.

--
greg

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] configure: allow adding a custom string to PG_VERSION
Next
From: Alvaro Herrera
Date:
Subject: Re: Fast insertion indexes: why no developments