On 20.02.2026 14:28, Ilia Evdokimov wrote: > On 2/20/26 16:25, Ilia Evdokimov wrote: > >> I've moved the NULL check higher, placing it immediately after >> DatumGetArrayTypeP(). This allows us to detect the presence of NULL >> elements before decontructing the array. >> > Sorry, I forgot to attach the patch in my previous mail. Attaching it now.
Cool that the array code had that functionality already. The patch looks good to me and now no longer regresses other cases. The speedup will be less pronounced once the hash-based [NOT] IN code is merged [1] but will still save considerable amounts of cycles. It seems like we don't have a regression test which has a NULL value in the NOT IN list. Maybe you can find a good place to add that one? -- David Geier [1] https://www.postgresql.org/message-id/flat/7db341e0-fbc6-4ec5-922c-11fdafe7be12%40tantorlabs.com
