pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Luc Lachance <jllachan@sympatico.ca>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org, Frank van Vugt <ftm.van.vugt@foxi.nl>
Subject: Re: *very* inefficient choice made by the planner (regarding
Date: Thu, 10 Jun 2004 12:56:26 -0400
Message-ID: <40C892BA.8080704@sympatico.ca> (raw)
In-Reply-To: <25304.1086883145@sss.pgh.pa.us>
References: <200406101624.21739.ftm.van.vugt@foxi.nl>
	<40C881FE.5000301@sympatico.ca>
	<25304.1086883145@sss.pgh.pa.us>

I agree, but it should be a simple rewrite. No?

x IS NULL/IS NOT NULL AND/OR NOT EXISTS


Tom Lane wrote:

> Jean-Luc Lachance <jllachan@sympatico.ca> writes:
> 
>>If the two statments are functionally equivalent, why can't PG rewrite 
>>the "NOT IN" version into the more efficient "NOT EXISTS"?
> 
> 
> They're not equivalent.  In particular, the behavior in the presence of
> NULLs is quite different.
> 
> 			regards, tom lane
> 




view thread (12+ messages)  latest in thread

Message-ID: <40C892BA.8080704@sympatico.ca>
Permalink:  ../40C892BA.8080704@sympatico.ca/
Also on:    postgresql.org/message-id/40C892BA.8080704@sympatico.ca

 · 

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: jllachan@sympatico.ca, tgl@sss.pgh.pa.us, ftm.van.vugt@foxi.nl
  Subject: Re: *very* inefficient choice made by the planner (regarding
  In-Reply-To: <40C892BA.8080704@sympatico.ca>

* 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