Re: Hash-based MCV matching for large IN-lists - Mailing list pgsql-hackers

From Ilia Evdokimov
Subject Re: Hash-based MCV matching for large IN-lists
Date
Msg-id 9e3054ae-1c5d-46dd-9b6a-7fb67764b076@tantorlabs.com
Whole thread Raw
In response to Re: Hash-based MCV matching for large IN-lists  (Tatsuya Kawata <kawatatatsuya0913@gmail.com>)
Responses Re: Hash-based MCV matching for large IN-lists
Re: Hash-based MCV matching for large IN-lists
Re: Hash-based MCV matching for large IN-lists
List pgsql-hackers
I've fixed all the comments raised above and updated the v5 patch.


On 2/7/26 10:42, Tatsuya Kawata wrote:
> I initially considered consolidating this by checking for NULL 
> elements before building the hash table, but realized this would add 
> an extra loop in the common case where there are no NULLs.

Thanks for that suggestion. We can check for NULL elements without an 
explicit loop by using memchr(), so there's no need for an additional 
building of hash table. I'll update patch with it.

That said, I think it might be better to continue this small 
optimization with NULL for constant arrays separately in another thread. 
It's cleaner to split this work into smaller, focused changes rather 
than mixing everything into single patch


If anything is still unclear in the code or insufficiently documented, 
or if you have other suggestions, please do not hesitate to point them out.

--
Best regards.
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/

Attachment

pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: [OAuth2] Infrastructure for tracking token expiry time
Next
From: Zsolt Parragi
Date:
Subject: [oauth] Bug: when is shutdown_cb called?