| From: | "Mattias Kregert" <mattias(at)kregert(dot)se> |
|---|---|
| To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: Strange plan in pg 8.1.0 |
| Date: | 2006-10-30 15:38:13 |
| Message-ID: | 003e01c6fc39$6970bf90$09000a0a@kregert.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Mattias Kregert <mattias(at)kregert(dot)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 */
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steinar H. Gunderson | 2006-10-30 15:49:57 | Re: Strange plan in pg 8.1.0 |
| Previous Message | Tom Lane | 2006-10-30 15:09:29 | Re: Strange plan in pg 8.1.0 |