Re: Automatic optimization of IN clauses via INNER JOIN

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: Automatic optimization of IN clauses via INNER JOIN
Дата
Msg-id
603c8f070912181622l2d74d0cdq94390eb1b1911729@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Automatic optimization of IN clauses via INNER JOIN Thomas Hamilton <thomashamilton76@yahoo.com>
Re: Automatic optimization of IN clauses via INNER JOIN Tom Lane <tgl@sss.pgh.pa.us>
Re: Automatic optimization of IN clauses via INNER JOIN Thomas Hamilton <thomashamilton76@yahoo.com>
Re: Automatic optimization of IN clauses via INNER JOIN Tom Lane <tgl@sss.pgh.pa.us>
Re: Automatic optimization of IN clauses via INNER JOIN Craig Ringer <craig@postnewspapers.com.au>
Re: Automatic optimization of IN clauses via INNER JOIN Robert Haas <robertmhaas@gmail.com>
Re: Automatic optimization of IN clauses via INNER JOIN Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: Automatic optimization of IN clauses via INNER JOIN Robert Haas <robertmhaas@gmail.com>
Re: Automatic optimization of IN clauses via INNER JOIN Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: Automatic optimization of IN clauses via INNER JOIN Robert Haas <robertmhaas@gmail.com>
Re: Automatic optimization of IN clauses via INNER JOIN Tom Lane <tgl@sss.pgh.pa.us>
Re: Automatic optimization of IN clauses via INNER JOIN Robert Haas <robertmhaas@gmail.com>
Re: Automatic optimization of IN clauses via INNER JOIN Robert Haas <robertmhaas@gmail.com>
Re: Automatic optimization of IN clauses via INNER JOIN Grzegorz Jaśkiewicz <gryzman@gmail.com>
2009/12/18 Grzegorz Jaśkiewicz :
> 2009/12/18 Robert Haas :
>> 2009/12/18 Grzegorz Jaśkiewicz :
>>> On Fri, Dec 18, 2009 at 2:18 PM, Robert Haas  wrote:
>>>
>>>> NOT IN is the only that really kills you as far as optimization is
>>>> concerned.  IN can be transformed to a join.  NOT IN forces a NOT
>>>> (subplan)-type plan, which bites - hard.
>>>
>>> in a well designed database (read: not abusing NULLs) - it can be done
>>> with joins too.
>>
>> But not by PostgreSQL, or so I believe.
>
> using left join ?

If at least one column in the subselect is strict, you can rewrite it
that way yourself, but the optimizer won't do it. I wish it did, but I
don't wish it badly enough to have written the code myself, and
apparently neither does anyone else.

...Robert
В списке pgsql-performance по дате отправления
От: Greg Stark
Дата:
От: Robert Haas
Дата:
FAQ