Re: hash index work - Mailing list pgsql-patches

From Neil Conway
Subject Re: hash index work
Date
Msg-id 42986EBE.4070904@samurai.com
Whole thread Raw
In response to Re: hash index work  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: hash index work
List pgsql-patches
Bruce Momjian wrote:
> Neil, I have added these item to the TODO list.  Do you plan on applying
> this?

No, I don't have any immediate plans to apply it, as unfortunately I
didn't see a performance win :-( It's also possible I'm just not
measuring the right workload, although I don't have time to rerun the
benchmarks at the moment.

The patch does two things: (1) change hash indexes to only store the
key's hash value, not the entire key (2) store index elements within a
hash bucket in order of hash key and search for matches via binary
search. #1 is definitely a win in some in some circumstances (e.g.
indexing large fields or types with expensive equality operators), but
those aren't the common case. I'm surprised that #2 is not a more
noticeable improvement...

One possibility would be to provide an optional implementation of #1,
perhaps via an alternate index operator class. That way people could
select it in those situations in which it is worth using.

-Neil

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Fix PID file location?
Next
From: Robert Treat
Date:
Subject: Re: psql backslash consistency