Re: Hash index todo list item - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Hash index todo list item
Date
Msg-id 20070910150443.GB16512@svana.org
Whole thread Raw
In response to Re: Hash index todo list item  (Mark Mielke <mark@mark.mielke.cc>)
List pgsql-hackers
On Sat, Sep 08, 2007 at 06:56:23PM -0400, Mark Mielke wrote:
> I think that if the case of >1 entry per hash becomes common enough to
> be significant, and the key is stored in the hash, that a btree will
> perform equal or better, and there is no point in pursuing  such a hash
> index model. This is where we are today.

There is the point that if a user does an UPDATE of a row without
changing the key your index will have to store entries with the same
hash. If your goal is mostly write-once tables, then that's cool, but
otherwise you're going to have to find a way of dealing with that. It's
not just going to happen a lot, it is going to be common, even for
unique indexes.

Presumably HOT will help with this, but that relies on all index columns
not to change.

The major benenfits will mostly come from not storing the key at all. I
think.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: A Silly Idea for Vertically-Oriented Databases
Next
From: Tatsuo Ishii
Date:
Subject: Re: invalidly encoded strings