Re: Hash index todo list item

From: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
To: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Cc: Hannu Krosing <hannu(at)skype(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, Kenneth Marshall <ktm(at)rice(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hash index todo list item
Date: 2007-09-06 21:17:12
Message-ID: 46E06E58.1080708@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Glaesemann wrote:
> On Sep 6, 2007, at 10:53 , Mark Mielke wrote:
>> I don't like the truncating hash suggestion because it limits the
>> ability of a hash code to uniquely identify a key.
> AIUI, a hash can't be used as a unique identifier: it always needs to
> be rechecked due to the chance of collisions. There might be other
> issues with truncation, but preventing hashes from being unique isn't
> one of them.

Of course - that's why I used the word "limit".

Hash works best, when the key is unique, however. A 32-bit hash will be
many powers of 2 more unique than a 8-bit hash.

Cheers,
mark

--
Mark Mielke <mark(at)mielke(dot)cc>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Decibel! 2007-09-06 22:50:41 Re: Just-in-time Background Writer Patch+Test Results
Previous Message Kevin Grittner 2007-09-06 21:15:06 Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)