Re: *very* inefficient choice made by the planner (regarding

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: *very* inefficient choice made by the planner (regarding
Дата
Msg-id 20040610100332.D20710@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: *very* inefficient choice made by the planner (regarding  (Jean-Luc Lachance <jllachan@sympatico.ca>)
Ответы Re: *very* inefficient choice made by the planner (regarding  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-performance
On Thu, 10 Jun 2004, Jean-Luc Lachance wrote:

> I agree, but it should be a simple rewrite. No?

It's NULLs inside the subselect that are the issue.

select 1 in (select a from foo)
select exists ( select 1 from foo where a=1)

If foo.a contains a row with NULL but no rows containing a 1, the above
give different results (unknown and exists) and IIRC, exists cannot
return unknown, so there's no simple rewrite of the subselect that gives
equivalent behavior.


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

Предыдущее
От: Jean-Luc Lachance
Дата:
Сообщение: Re: *very* inefficient choice made by the planner (regarding
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: *very* inefficient choice made by the planner (regarding