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(at)ntlworld(dot)com (David W Noon)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*