| From: | Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com> |
|---|---|
| To: | Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)com>, David Geier <geidav(dot)pg(at)gmail(dot)com> |
| Cc: | Chengpeng Yan <chengpeng_yan(at)outlook(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Hash-based MCV matching for large IN-lists |
| Date: | 2026-02-18 12:48:36 |
| Message-ID: | 9e3054ae-1c5d-46dd-9b6a-7fb67764b076@tantorlabs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| v5-0001-Use-hash-based-MCV-matching-for-ScalarArrayOpExpr.patch | text/x-patch | 18.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-02-18 12:50:33 | [oauth] Bug: when is shutdown_cb called? |
| Previous Message | Zsolt Parragi | 2026-02-18 12:04:13 | Re: [OAuth2] Infrastructure for tracking token expiry time |