pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David W Noon <dwnoon@ntlworld.com>
To: pgsql-admin@postgresql.org
Subject: Re: Interesting Query Performance Question
Date: Sat, 6 Nov 2010 16:53:54 +0000
Message-ID: <20101106165354.67ed9532@karnak.local> (raw)
In-Reply-To: <20024.1289059188@sss.pgh.pa.us>
References: <68C107706843A54BA7D9CAEF123ADF05010346CAE6@SP2-EX07VS03.ds.corp.yahoo.com>
	<20024.1289059188@sss.pgh.pa.us>

On Sat, 06 Nov 2010 11:59:48 -0400, Tom Lane wrote about Re: [ADMIN]
Interesting Query Performance Question:

>In general, NOT IN is hard to optimize because of its weird behavior
>for NULLs.  I'd suggest looking into converting the query to use an
>EXISTS instead.

I have know about that issue for some years, so I always use a column
that has been declared NOT NULL for the sub-query.  Does PostgreSQL not
use that property to bypass the vagaries of NULL in an IN predicate?
-- 
Regards,

Dave  [RLU #314465]
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
dwnoon@ntlworld.com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Attachments:

  signature.asc (application/pgp-signature, 197B) download

view thread (4+ messages)  latest in thread

Message-ID: <20101106165354.67ed9532@karnak.local>
Permalink:  ../20101106165354.67ed9532@karnak.local/
Also on:    postgresql.org/message-id/20101106165354.67ed9532@karnak.local

 · 

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-admin@postgresql.org
  Cc: dwnoon@ntlworld.com
  Subject: Re: Interesting Query Performance Question
  In-Reply-To: <20101106165354.67ed9532@karnak.local>

* 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