Re: not in(subselect) in 8.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: not in(subselect) in 8.4
Дата
Msg-id 8918.1235144033@sss.pgh.pa.us
обсуждение исходный текст
Ответ на not in(subselect) in 8.4  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Ответы Re: not in(subselect) in 8.4  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Re: not in(subselect) in 8.4  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
Re: not in(subselect) in 8.4  (Scott Carey <scott@richrelevance.com>)
Список pgsql-performance
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= <gryzman@gmail.com> writes:
> I mean query like:
> select id from foo where id not in ( select id from bar);
> into:
> select f.id from foo f left join bar b on f.id=b.id where b.id is null;

Postgres does not do that, because they don't mean the same thing ---
the behavior for NULLs in bar.id is different.

8.4 does understand that NOT EXISTS is an antijoin, though.

            regards, tom lane

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

Предыдущее
От: Matthew Wakeling
Дата:
Сообщение: Re: SSD performance
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: not in(subselect) in 8.4