Re: Questions about Exists-Not exists clause - Mailing list pgsql-novice

From Avi Schwartz
Subject Re: Questions about Exists-Not exists clause
Date
Msg-id 1EF1E023-BE19-11D7-857F-000393AE5044@CFFtechnologies.com
Whole thread Raw
In response to Re: Questions about Exists-Not exists clause  (M Spreij <nemo@mechintosh.com>)
Responses Re: Questions about Exists-Not exists clause  (papapep <papapep@gmx.net>)
List pgsql-novice
Not wrong, but under 7.3.x it can be much slower then using 'not
exists' when the sub-select returns a long list of values.  I believe
the 7.4 fixes this so both will end up equivalent.

Avi

On Thursday, Jul 24, 2003, at 15:46 America/Chicago, M Spreij wrote:

>> SELECT * FROM A WHERE NOT EXISTS (SELECT NULL FROM B WHERE
>> A.field3=B.field6);
>
> I did this recently, using
> SELECT * FROM A WHERE field3 NOT IN (SELECT field6 FROM B)
>
> Now if this is totally wrong tell me *gently*, it's the first question
> I felt I was up to to answer :-)


pgsql-novice by date:

Previous
From: M Spreij
Date:
Subject: Re: design/copying a bunch of records
Next
From: Alejandro Fuentes González
Date:
Subject: PROBLEMS WITH GENERIC CONNECTIVITY