Re: Interesting Query Performance Question - Mailing list pgsql-admin

From David W Noon
Subject Re: Interesting Query Performance Question
Date
Msg-id 20101106165354.67ed9532@karnak.local
Whole thread Raw
In response to Re: Interesting Query Performance Question  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Interesting Query Performance Question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
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)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Attachment

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Interesting Query Performance Question
Next
From: Tom Lane
Date:
Subject: Re: Interesting Query Performance Question