Re: Optimizing NOT IN plans / verify rewrite - Mailing list pgsql-performance

From Andres Freund
Subject Re: Optimizing NOT IN plans / verify rewrite
Date
Msg-id 20100802221900.GC2892@anarazel.de
Whole thread Raw
In response to Re: Optimizing NOT IN plans / verify rewrite  (Maciek Sakrejda <msakrejda@truviso.com>)
List pgsql-performance
On Mon, Aug 02, 2010 at 01:35:13PM -0700, Maciek Sakrejda wrote:
> >> All fields involved are declared NOT NULL, but thanks for the heads up.
> >Afair the planner doesnt use that atm.
>
> I was referring to not having to care about the strange NULL semantics
> (as per your original comment), since I have no NULLs. Given that, I
> think the NOT EXISTS could be a good solution, even on 8.3 (we're
> planning to upgrade, but it's not a feasible solution to this
> particular problem), no?
The point is that only 8.4 will optimize that case properly. 8.3 will
generate plans which are inefficient in many (or most) cases for both
variants. I would suggest to use manual antijoins...

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Optimizing NOT IN plans / verify rewrite
Next
From: Josh Berkus
Date:
Subject: Re: Testing Sandforce SSD