Re: NOT IN subquery optimization

Поиск
Список
Период
Сортировка
От Jim Finnerty
Тема Re: NOT IN subquery optimization
Дата
Msg-id 1550714005660-0.post@n3.nabble.com
обсуждение исходный текст
Ответ на Re: NOT IN subquery optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: NOT IN subquery optimization  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
re: The idea that's been kicked around in the past is to detect whether the
subselect's output column(s) can be proved NOT NULL, and if so, convert
to an antijoin just like NOT EXISTS

basically, yes.  this will handle nullability of both the outer and inner
correlated expression(s), multiple expressions, presence or absence of
predicates in the WHERE clause, and whether the correlated expressions are
on the null-padded side of an outer join.  If it is judged to be more
efficient, then it transforms the NOT IN sublink into an anti-join.

some complications enter into the decision to transform NOT IN to anti-join
based on whether a bitmap plan will/not be used, or whether it will/not be
eligible for PQ.



-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Delay locking partitions during INSERT and UPDATE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Performance issue in foreign-key-aware join estimation