Re: Reduce planning time for large NOT IN lists containing NULL

Поиск
Список
Период
Сортировка
От David Geier
Тема Re: Reduce planning time for large NOT IN lists containing NULL
Дата
Msg-id 6b3aebb5-f26c-4f50-abd6-e733d452af26@gmail.com
обсуждение исходный текст
Ответ на Re: Reduce planning time for large NOT IN lists containing NULL  (Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>)
Ответы Re: Reduce planning time for large NOT IN lists containing NULL
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления: