Re: Hash indexes

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Gregory Stark <gsstark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, 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
Date: 2006-08-01 21:22:32
Message-ID: 1154467352.19546.14.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval, T, 2006-08-01 kell 10:54, kirjutas Andrew Dunstan:
> Gregory Stark wrote:
> >
> > I looked a while back and was suspicious about the actual hash functions too.
> > It seemed like a lot of them were vastly suboptimal. That would mean we're
> > often dealing with mostly empty and mostly full buckets instead of well
> > distributed hash tables.
> >
> >
> >
>
> This is now sounding like a lot of low hanging fruit ... highly
> performant hash indexed tables could possibly be a very big win.
>

Are you sure about the badness of our hash functions ?

I just tested and hashtext(text) has about 1.4% of collisions on about
120M distinct texts, which is not bad considering thet total space for
hashes is 4G, meaning that 120M covers itself already 3% of possible
hash space.

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message bob_jenkins 2006-08-01 21:26:18 Re: Hash indexes (was: On-disk bitmap index patch)
Previous Message Tom Lane 2006-08-01 20:47:34 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES] 8.2 features?)