pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Maciek Sakrejda <msakrejda@truviso.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimizing NOT IN plans / verify rewrite
Date: Tue, 3 Aug 2010 00:19:00 +0200
Message-ID: <20100802221900.GC2892@anarazel.de> (raw)
In-Reply-To: <AANLkTi=a2ZprXAio2dNMbbWXMLc9QeKV_QO0qcF9qesX@mail.gmail.com>
References: <AANLkTim0entqazUpWhwotC+gcDGrmeM=a=WPJUv=MgdO@mail.gmail.com>
	<20100802195257.GA2892@anarazel.de>
	<AANLkTinxCB-cZ+8C0bf4pjhs26-u=J4fddr4GoxGdhB2@mail.gmail.com>
	<20100802202151.GB2892@anarazel.de>
	<AANLkTi=a2ZprXAio2dNMbbWXMLc9QeKV_QO0qcF9qesX@mail.gmail.com>

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...



view thread (14+ messages)  latest in thread

Message-ID: <20100802221900.GC2892@anarazel.de>
Permalink:  ../20100802221900.GC2892@anarazel.de/
Also on:    postgresql.org/message-id/20100802221900.GC2892@anarazel.de

 · 

reply

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: andres@anarazel.de, msakrejda@truviso.com
  Subject: Re: Optimizing NOT IN plans / verify rewrite
  In-Reply-To: <20100802221900.GC2892@anarazel.de>

* 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