Skip site navigation (1) Skip section navigation (2)

Re: Hash index

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: RAJU kumar <raju_19db(at)rediffmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Hash index
Date: 2005-08-30 18:53:43
Message-ID: 1125428023.28179.94.camel@state.g2switchworks.com (view raw or flat)
Thread:
Lists: 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.

In response to

  • Hash index at 2005-08-26 10:59:50 from RAJU kumar

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2005-08-30 19:32:26
Subject: Re: Hash index
Previous:From: Bruno Wolff IIIDate: 2005-08-30 18:35:40
Subject: Re: size of indexes and tables (more than 1GB)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group