Re: [HACKERS] GSoC on WAL-logging hash indexes

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tan Tran <tankimtran(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, pgsql-advocacy <pgsql-advocacy(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] GSoC on WAL-logging hash indexes
Date: 2014-04-30 18:03:48
Message-ID: CAMkU=1wYbPHnsab8EnkyawYrdBtt5kcrYSnHgKamU57ZBL5zyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers pgsql-students

On Wed, Apr 30, 2014 at 12:26 AM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:

> On Mon, Mar 3, 2014 at 8:12 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >> As a GSoC student, I will implement WAL recovery of hash indexes using
> the
> >> other index types' WAL code as a guide.
>
> Frankly, I'm skeptical of the idea that hash indexes will ever really
> be useful. I realize that that's a counter-intuitive conclusion, but
> there are many things we could do to improve B-Tree CPU costs to make
> them closer to those of hash indexes, without making them any less
> flexible. I myself would much rather work on that, and intend to.
>

If we don't put in the work to make them useful, then they won't ever
become useful.

If we do put in the effort (and it would be considerable) then I think they
will be. But you may be correct that the effort required would perhaps be
better used in making btree even more better. I don't think we can
conclude that definitively without putting in the work to do the experiment.

One advantage of the hash indexes is that the code is simple enough for
someone to actually understand it in a summer. Whether it would still be
like that after WAL logging was implemented, I don't know.

The O(1) cost seems attractive when you consider that that only
> requires that we read one index page from disk to service any given
> index scan, but in fact B-Trees almost always only require the same.
> They are of course also much more flexible. The concurrency
> characteristics B-Trees are a lot better understood.

Not sure what you mean there. The concurrency issues of the hash index has
a lot less that needs to be understand. I think I understand it pretty
well (unlike B-tree), I just don't know what to with that knowledge.

> I sincerely
> suggest that we forget about conventional hash table type indexes. I
> fear they're a lost cause.
>

I understand that those are the only ones worth fighting for. :)

Cheers,

Jeff

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Jeff Janes 2014-04-30 18:10:22 Re: [HACKERS] GSoC on WAL-logging hash indexes
Previous Message Peter Geoghegan 2014-04-30 18:02:56 Re: [HACKERS] GSoC on WAL-logging hash indexes

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2014-04-30 18:10:22 Re: [HACKERS] GSoC on WAL-logging hash indexes
Previous Message Peter Geoghegan 2014-04-30 18:02:56 Re: [HACKERS] GSoC on WAL-logging hash indexes

Browse pgsql-students by date

  From Date Subject
Next Message Jeff Janes 2014-04-30 18:10:22 Re: [HACKERS] GSoC on WAL-logging hash indexes
Previous Message Peter Geoghegan 2014-04-30 18:02:56 Re: [HACKERS] GSoC on WAL-logging hash indexes