Re: Hash Indexes

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Mithun Cy <mithun(dot)cy(at)enterprisedb(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>
Subject: Re: Hash Indexes
Date: 2016-09-30 08:07:15
Message-ID: CAA4eK1KXFJwHvPUOh4cwFtfeN6Z7ZDLz05GzyYsfw0ajYEC7gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 30-Sep-2016 6:24 AM, "Robert Haas" <robertmhaas(at)gmail(dot)com> wrote:
>
> On Thu, Sep 29, 2016 at 8:29 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > On September 29, 2016 5:28:00 PM PDT, Robert Haas <robertmhaas(at)gmail(dot)com>
wrote:
> >>On Thu, Sep 29, 2016 at 8:16 PM, Andres Freund <andres(at)anarazel(dot)de>
> >>wrote:
> >>>> Well, I, for one, find it frustrating. It seems pretty unhelpful to
> >>>> bring this up only after the code has already been written.
> >>>
> >>> I brought this up in person at pgcon too.
> >>
> >>To whom? In what context?
> >
> > Amit, over dinner.
>
> OK, well, I can't really comment on that, then, except to say that if
> you waited three months to follow up on the mailing list, you probably
> can't blame Amit if he thought that it was more of a casual suggestion
> than a serious objection. Maybe it was? I don't know.
>

Both of them have talked about hash indexes with me offline. Peter
mentioned that it would be better to improve btree rather than hash
indexes. IIRC, Andres asked me mainly about what use cases I have in mind
for hash indexes and then we do have some further discussion on the same
thing where he was not convinced that there is any big use case for hash
indexes even though there may be some cases. In that discussion, as he is
saying and I don't doubt him, he would have told me the alternative, but it
was not apparent to me that he is expecting some sort of comparison.

What I got from both the discussions was a friendly gesture that it might
be a better use of my time, if I work on some other problem. I really
respect suggestions from both of them, but it was no where clear to me that
any one of them is expecting any comparison of other approach.

Considering, I have missed the real intention of their suggestions, I
think such a serious objection on any work should be discussed on list. To
answer the actual objection, I have already mentioned upthread that we can
deduce from the current tests done by Jesper and Mithun that there are some
cases where hash index will be better than hash-over-btree (tests done over
integer columns). I think any discussion on whether we should consider not
to improve current hash indexes is only meaningful if some one has a code
which can prove both theoretically and practically that it is better than
hash indexes for all usages.

Note - excuse me for formatting of this email as I am on travel and using
my phone.

With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Victor Wagner 2016-09-30 08:44:51 Re: Patch: Implement failover on libpq connect level.
Previous Message Michael Paquier 2016-09-30 06:03:02 Re: Sample configuration files