Re: Behavior of hash index on a text field

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Monarchi" <david(dot)e(dot)monarchi(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Behavior of hash index on a text field
Date: 2007-03-31 17:50:25
Message-ID: 7032.1175363425@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"David Monarchi" <david(dot)e(dot)monarchi(at)gmail(dot)com> writes:
> I believe (but don't know) that a hash index would be better for this than a
> btree.

A fairly reliable rule of thumb is that there isn't *any* situation
where a Postgres hash index outperforms a btree.

Why this is so is not entirely clear, and various people keep poking
at the code in hopes of making it better. Sooner or later we'll either
succeed in getting hash indexes to be a win for specific use cases,
or give up and drop them entirely.

But at present it is undeniable that Postgres hash indexes are not
production quality. (Even if they had a performance win, their
current lack of WAL backup makes them unfit for production use...)

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Leonel 2007-03-31 19:05:44 Re: Anyone know where I can get an 8.2.3 binary for ubuntu?
Previous Message Joshua D. Drake 2007-03-31 17:48:03 Re: Anyone know where I can get an 8.2.3 binary for ubuntu?