Re: Bug in execution of EXISTS and IN clauses for large tables

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Bug in execution of EXISTS and IN clauses for large tables
Дата
Msg-id CAApHDvpCKAe-7K-JfV3vYfvfTET7sjEEUFCArco3MqknmnpJYg@mail.gmail.com
обсуждение исходный текст
Ответ на RE: Bug in execution of EXISTS and IN clauses for large tables  (Martin Kos <martin.kos@molecularhealth.com>)
Список pgsql-bugs
On Wed, 23 Feb 2022 at 09:29, Martin Kos <martin.kos@molecularhealth.com> wrote:
> Just to confirm (sorry if this is a trivial question) - the "exists" and "in" should never behave like an inner join,
right?

If the query planner is able first determine that the IN/EXISTs can be
executed as a semi-join, and it later can also find proofs that any
given outer side row of the semi-join can match to *at most* 1 inner
side row, then the planner will switch this to an inner join. This
allows more flexibility in the join orders, which can produce more
efficient plans.

David



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

Предыдущее
От: Mark Murawski
Дата:
Сообщение: Re: Bug plperl.c
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17414: install failed