Re: Strange plan in pg 8.1.0

Поиск
Список
Период
Сортировка
От Mattias Kregert
Тема Re: Strange plan in pg 8.1.0
Дата
Msg-id 003e01c6fc39$6970bf90$09000a0a@kregert.se
обсуждение исходный текст
Ответ на Strange plan in pg 8.1.0  (Mattias Kregert <mattias@kregert.se>)
Список pgsql-performance
From: "Tom Lane" <tgl@sss.pgh.pa.us>
> Mattias Kregert <mattias@kregert.se> writes:
>> Why does it come up with this strange plan?
>
> Because 8.1 can't reorder outer joins.  To devise the plan you want,
> the planner has to be able to prove that it's OK to perform the IN join
> before the LEFT join, something that isn't always the case.  8.2 can
> prove this, but no existing release can.
>
> The only workaround I can think of is to do the IN in a sub-select.
>
> regards, tom lane
>

Thanks!
I'll try some subselect solution for now, and make a note to change it when
8.2 is out.

/* m */

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

Предыдущее
От: "Luke Lonergan"
Дата:
Сообщение: Re: Best COPY Performance
Следующее
От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: Strange plan in pg 8.1.0