Re: NOT IN subquery optimization

Поиск
Список
Период
Сортировка
От Li, Zheng
Тема Re: NOT IN subquery optimization
Дата
Msg-id 61BFFE8C-F884-4936-BB28-0098283F4719@amazon.com
обсуждение исходный текст
Ответ на NOT IN subquery optimization  (Jim Finnerty <jfinnert@amazon.com>)
Ответы Re: NOT IN subquery optimization  ("Li, Zheng" <zhelli@amazon.com>)
Список pgsql-hackers
-----
    To avoid planning the subquery again later on, I want to keep a pointer of
    the subplan in SubLink so that we can directly reuse the subplan when
    needed. However, this change breaks initdb for some reason and I'm trying to
    figure it out.
-----

"make clean" solved the initdb issue. This new patch keeps a pointer of the subplan
 in SubLink so that we can directly reuse the subplan when needed. When the subplan
is not hashable (too big to fit in work_mem), the NOT IN query will be flattened to
an ANTI JOIN and we won't need to use subplan again. However, when the subplan
is hashable, we don't do the conversion and will need to use subplan later, patch v2.1
avoids planning the subquery twice in this case.

-----------
Zheng Li
AWS, Amazon Aurora PostgreSQL    
    


Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Valgrind failures in Apply Launcher's bgworker_quickdie() exit
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: initdb recommendations