Re: Hash index build performance tweak from sorting

From: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hash index build performance tweak from sorting
Date: 2022-05-10 09:42:59
Message-ID: CANbhV-GCSVZGRDtoc52h5+h=uQZ7yDTV5J7oqv=ZEHkezGEZjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 30 Apr 2022 at 12:12, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> Few comments on the patch:
> 1. I think it is better to use DatumGetUInt32 to fetch the hash key as
> the nearby code is using.
> 2. You may want to change the below comment in HSpool
> /*
> * We sort the hash keys based on the buckets they belong to. Below masks
> * are used in _hash_hashkey2bucket to determine the bucket of given hash
> * key.
> */

Addressed in new patch, v2.

On Wed, 4 May 2022 at 11:27, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> So, we should go with this unless someone else sees any flaw here.

Cool, thanks.

--
Simon Riggs http://www.EnterpriseDB.com/

Attachment Content-Type Size
hash_sort_by_hash.v2.patch application/octet-stream 1.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2022-05-10 09:58:31 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Amit Kapila 2022-05-10 09:27:28 Re: Support logical replication of DDLs