outer join versus not exists

From: chester c young <chestercyoung(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: outer join versus not exists
Date: 2003-03-18 16:54:27
Message-ID: 20030318165427.52097.qmail@web12703.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

In pg, is there any performance gain in using outer join with null as
versus using not exists, eg:

select t1.* from t1 right join t2 using( id ) where t2.id is null;

versus

select * from t1 where not exists (select 1 from t2 where t1.id=t2.id);

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2003-03-18 17:14:50 Re: Numeric type
Previous Message Josh Berkus 2003-03-18 16:35:30 Re: Count equals 0