Re: Hash Indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Naz Gassiep <naz(at)mira(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Hash Indexes
Date: 2008-01-07 20:10:11
Message-ID: 24582.1199736611@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Naz Gassiep <naz(at)mira(dot)net> writes:
>> Why are hash indexes "obviously" best? In an ideal world with a good
>> implementation maybe, but postgresql b-trees are really quite good.
>>
> Because doing normal queries on a table where there are large text
> blocks is unlikely to be a good idea. E.g.,:
> SELECT * FROM table WHERE textcol = 'a 4kb block of text';

You seem to be harboring some rather severe conceptual errors about
how hash indexes work, or at least how Postgres' hash indexes work.
I get the impression you think that a hash index stores only a hash
code and not the actual field value, but that's not so.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2008-01-07 20:22:04 Re: many to one of many modeling question
Previous Message Scott Marlowe 2008-01-07 20:00:59 Re: calculating shared data memory space