Re: Hash indexes (was: On-disk bitmap index patch)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jim Nasby <jnasby(at)pervasive(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannu(at)skype(dot)net>, Luke Lonergan <LLonergan(at)greenplum(dot)com>, mark(at)mark(dot)mielke(dot)cc, Bruce Momjian <bruce(at)momjian(dot)us>, Jie Zhang <jzhang(at)greenplum(dot)com>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hash indexes (was: On-disk bitmap index patch)
Date: 2006-07-27 17:46:01
Message-ID: 20060727174601.GE18774@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby wrote:
> On Jul 25, 2006, at 3:31 PM, Tom Lane wrote:
> >Hannu Krosing <hannu(at)skype(dot)net> writes:

> >>What would be the use-case for hash indexes ? And what should be
> >>done to make them faster than btree ?
> >
> >If we knew, we'd do it ;-) But no one's put enough effort into it
> >to find out.
>
> Do they use the same hash algorithm as hash joins/aggregation? If so,
> wouldn't hash indexes be faster for those operations than regular
> indexes?

The main problem doesn't seem to be in the hash algorithm (which I
understand to mean the hashing function), but in the protocol for
concurrent access of index pages, and the distribution of keys in pages
of a single hash key.

This is described in a README file or a code comment somewhere in the
hash AM code. Someone needs to do some profiling to find out what the
bottleneck really is, and ideally find a way to fix it.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-07-27 19:46:28 Re: [PATCHES] [COMMITTERS] pgsql: /contrib/cube improvements:
Previous Message Bort, Paul 2006-07-27 17:17:50 Re: GUC with units, details