Re: Reduce planning time for large NOT IN lists containing NULL
В списке pgsql-hackers по дате отправления:
| От | Ilia Evdokimov |
|---|---|
| Тема | Re: Reduce planning time for large NOT IN lists containing NULL |
| Дата | |
| Msg-id | ed61316c-2e48-45d1-9cca-dc539bfd93b9@tantorlabs.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 2/20/26 12:06, Ilia Evdokimov wrote:
There is already ARR_HASNULL() which allows us to detect the presence of NULL in ArrayType.
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.
I tested this with several queries of the form:
WHERE x NOT IN (NULL, ...)
In my tests (with column x having detailed statistics, so selectivity estimation performs more work), planning time decreases from 5-200 ms before the patch to ~ 1-2 ms after the patch, depending on the list size.
--
Best regards.
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера