From: | "David Monarchi" <david(dot)e(dot)monarchi(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Behavior of hash index on a text field |
Date: | 2007-04-01 13:56:34 |
Message-ID: | eea51fdb0704010656n357bc8fej1afc913fab842b0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Thanks for the insight, Tom. I had read that Postgres hash indexes didn't
work too well, but thought that had been remedied in 8.2. Do you have any
thoughts about btree versus GiST or GIN for text data with very few
duplicate values?
Best,
david
On 3/31/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bob McConnell | 2007-04-01 20:25:32 | Re: Updating old code for new engine |
Previous Message | Tom Lane | 2007-04-01 06:45:30 | Re: Updating old code for new engine |