Save Hash Indexes

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Save Hash Indexes
Date: 2013-11-01 13:31:10
Message-ID: m2bo242qqp.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Here's an idea: when a user ask for an Hash Index transparently build a
BTree index over an hash function instead.

Advantages:

- it works
- it's crash safe
- it's (much?) faster than a hash index anyways

Drawbacks:

- root access concurrency
- we need a hash_any function stable against pg_upgrade

After talking about it with Heikki, we don't seem to find ways in which
the root access concurrency pattern would be visible enough to matter.

Also, talking with Peter Geoghegan, it's unclear that there's a use case
where a hash index would be faster than a btree index over the hash
function.

Comments?
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-11-01 13:49:57 Re: Save Hash Indexes
Previous Message Gurjeet Singh 2013-11-01 11:52:26 Re: Shave a few instructions from child-process startup sequence