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

From Peter Geoghegan
Subject Re: Next Steps with Hash Indexes
Date
Msg-id CAH2-Wz=xfxkcf+1nU7KfE9_-JTub40MHQFA8kZO7bu+PtXWESw@mail.gmail.com
Whole thread Raw
In response to Re: Next Steps with Hash Indexes  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: Next Steps with Hash Indexes  (Peter Geoghegan <pg@bowt.ie>)
Re: Next Steps with Hash Indexes  (Simon Riggs <simon.riggs@enterprisedb.com>)
List pgsql-hackers
On Wed, Oct 13, 2021 at 3:44 AM Simon Riggs
<simon.riggs@enterprisedb.com> wrote:
> > IMO it'd be nice to show some numbers to support the claims that storing
> > the extra hashes and/or 8B hashes is not worth it ...
>
> Using an 8-byte hash is possible, but only becomes effective when
> 4-byte hash collisions get hard to manage. 8-byte hash also makes the
> index 20% bigger, so it is not a good default.

Are you sure? I know that nbtree index tuples for a single-column int8
index are exactly the same size as those from a single column int4
index, due to alignment overhead at the tuple level. So my guess is
that hash index tuples (which use the same basic IndexTuple
representation) work in the same way.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: prevent immature WAL streaming
Next
From: Peter Geoghegan
Date:
Subject: Re: Next Steps with Hash Indexes