From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mattias Kregert <mattias@kregert.se>
Cc: pgsql-performance@postgresql.org
Subject: Re: Strange plan in pg 8.1.0
Date: Mon, 30 Oct 2006 10:09:29 -0500
Message-ID: <16059.1162220969@sss.pgh.pa.us> (raw)
In-Reply-To: <200610301205.08087.mattias@kregert.se>
References: <200610301205.08087.mattias@kregert.se>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, mattias@kregert.se
Subject: Re: Strange plan in pg 8.1.0
In-Reply-To: <16059.1162220969@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox