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

From Amit Kapila
Subject Re: Next Steps with Hash Indexes
Date
Msg-id CAA4eK1LnM1Sf6uFRM3XPrU0Lu_O7U6d02k+SDuS88XJD-NEwxw@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  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
List pgsql-hackers
On Wed, Oct 27, 2021 at 2:32 AM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Tue, Oct 5, 2021 at 6:50 AM Simon Riggs <simon.riggs@enterprisedb.com> wrote:
> > With unique data, starting at 1 and monotonically ascending, hash
> > indexes will grow very nicely from 0 to 10E7 rows without causing >1
> > overflow block to be allocated for any bucket. This keeps the search
> > time for such data to just 2 blocks (bucket plus, if present, 1
> > overflow block). The small number of overflow blocks is because of the
> > regular and smooth way that splits occur, which works very nicely
> > without significant extra latency.
>
> It is my impression that with non-unique data things degrade rather
> badly.
>

But we will hold the bucket lock only for unique-index in which case
there shouldn't be non-unique data in the index. The non-unique case
should work as it works today. I guess this is the reason Simon took
an example of unique data.

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Skipping logical replication transactions on subscriber side
Next
From: Dilip Kumar
Date:
Subject: Re: pgsql: Document XLOG_INCLUDE_XID a little better