Re: Next Steps with Hash Indexes - Mailing list pgsql-hackers

From John Naylor
Subject Re: Next Steps with Hash Indexes
Date
Msg-id CAFBsxsHm7UdOdgBm2vozyPb6TXxSO9SgMLVzf4vv8CUAMFiz6w@mail.gmail.com
Whole thread Raw
In response to Re: Next Steps with Hash Indexes  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Next Steps with Hash Indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Next Steps with Hash Indexes  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers

On Wed, Aug 11, 2021 at 10:54 AM Robert Haas <robertmhaas@gmail.com> wrote:
> don't know how the present patch tries to solve that problem.) It's
> tempting to think that we should think about creating something
> altogether new instead of hacking on the existing implementation, but
> that's a lot of work and I'm not sure what specific design would be
> best.

(Standard disclaimer that I'm not qualified to design index AMs) I've seen one mention in the literature about the possibility of simply having a btree index over the hash values. That would require faster search within pages, in particular using abbreviated keys in the ItemId array of internal pages [1] and interpolated search rather than pure binary search (which should work reliably with high-entropy keys like hash values), but doing that would speed up all btree indexes, so that much is worth doing regardless of how hash indexes are implemented. In that scheme, the hash index AM would just be around for backward compatibility.


--
John Naylor
EDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Use extended statistics to estimate (Var op Var) clauses
Next
From: Tom Lane
Date:
Subject: Re: Next Steps with Hash Indexes