Re: Hash index use presently(?) discouraged since 2005: revive or bury it? - Mailing list pgsql-performance

From Stefan Keller
Subject Re: Hash index use presently(?) discouraged since 2005: revive or bury it?
Date
Msg-id CAFcOn2_21Gds+725G8KTDFiTM+kz+3rG9-6zB37_9ge30dxkLg@mail.gmail.com
Whole thread Raw
In response to Re: Hash index use presently(?) discouraged since 2005: revive or bury it?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses How to make hash indexes fast  (Craig James <craig_james@emolecules.com>)
List pgsql-performance
I'm simply referring to literature (like the intro Ramakrishnan & Gehrke).
I just know that Oracle an Mysql actually do have them too and use it
without those current implementation specific restrictions in
Postgres.

IMHO by design Hash Index (e.g. linear hashing) work best when:
1. only equal (=) tests are used (on whole values)
2. columns (key values) have very-high cardinality

And ideally but not necessarily when index values do not change and
number of rows are known ahead of time (avoiding O(N) worst case - but
there are approaches to chaining with dynamic resizing).

I just collected this to encourage ourselves that enhancing hash
indexes could be worthwhile.

Stefan

2011/9/18 Kevin Grittner <Kevin.Grittner@wicourts.gov>:
> Stefan Keller  wrote:
>
>> It's hard for me to imagine that btree is superior for all the
>> issues mentioned before.
>
> It would be great if you could show a benchmark technique which shows
> otherwise.
>
> -Kevin
>

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Hash index use presently(?) discouraged since 2005: revive or bury it?
Next
From: Stefan Keller
Date:
Subject: What about implementing a bitmap index? Any use cases?