Re: Hash index - Mailing list pgsql-admin

From Scott Marlowe
Subject Re: Hash index
Date
Msg-id 1125428023.28179.94.camel@state.g2switchworks.com
Whole thread Raw
In response to Hash index  ("RAJU kumar" <raju_19db@rediffmail.com>)
Responses Re: Hash index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Fri, 2005-08-26 at 05:59, RAJU kumar wrote:
>
>
> i want to find out the difference between the btree index and hash
> index and how exactly the hash index work.

How do hash indexes work in postgresql?  Poorly.  badumpbump.  Thanks,
I'll be here all week (bad western humor, sorry.)

Seriously, there are issues that pop up here every so often that stump
people until we find out that they're using hash indexes and every goes
"Ohhhhh!  That's why X isn't working for you."

Currently, only btree indexes are handled properly in case of a server
crash (other indexes may get corrupted silently) and they are generally
as fast as or faster than hashes.

The basic concept in postgresql is the same as elsewhere, but they've
never been fleshed out properly, especially compared to btree, which
have had lots of testing and fixing and performance tuning and such.

Personally, I think that when one creates a non-btree index, one should
get a warning saying that non-btree indexes are not necessarily
transactionally safe in the event of a crash.

pgsql-admin by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: size of indexes and tables (more than 1GB)
Next
From: Tom Lane
Date:
Subject: Re: Hash index