Re: "NOT IN" predicate hangs result - Mailing list pgsql-general

From Tom Lane
Subject Re: "NOT IN" predicate hangs result
Date
Msg-id 18089.1018557717@sss.pgh.pa.us
Whole thread Raw
In response to Re: "NOT IN" predicate hangs result  (Andrew Sullivan <andrew@libertyrms.info>)
List pgsql-general
Andrew Sullivan <andrew@libertyrms.info> writes:
> Just out of curiosity, is there a fundamental reason the optimiser
> doesn't just rewrite NOT IN queries to use the NOT EXISTS form,

There are cases where the NOT IN implementation is better; I'd not like
to see the system forcing one approach to be used.

In the long run we should try to fix IN/NOT IN/EXISTS/NOT EXISTS to be
treated as variant kinds of join, at least for the simple cases that
people tend to use a lot.  This has been on the TODO list for awhile
but hasn't risen to the top.

            regards, tom lane

pgsql-general by date:

Previous
From: Andrew Gould
Date:
Subject: Re: where to find info about data types?
Next
From: "Johann Zuschlag"
Date:
Subject: Strange error messages : SI buffer overflow, cache state reset