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=a-hnwPJQeO0wWq4cbECpk+ta=J7PWwL9oeuBjTPqxDg@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  (Simon Riggs <simon.riggs@enterprisedb.com>)
List pgsql-hackers
On Thu, Oct 14, 2021 at 12:48 AM Simon Riggs
<simon.riggs@enterprisedb.com> wrote:
> The hash index tuples are 20-bytes each. If that were rounded up to
> 8-byte alignment, then that would be 24 bytes.
>
> Using pageinspect, the max(live_items) on any data page (bucket or
> overflow) is 407 items, so they can't be 24 bytes long.

That's the same as an nbtree page, which confirms my suspicion. The 20
bytes consists of a 16 byte tuple, plus a 4 byte line pointer. The
tuple-level alignment overhead gets you from 12 bytes to 16 bytes with
a single int4 column. So the padding is there for the taking.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column
Next
From: Jaime Casanova
Date:
Subject: Re: [PATCH] Proposal for HIDDEN/INVISIBLE column