pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: chester c young <chestercyoung@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: outer join versus not exists
Date: Tue, 18 Mar 2003 08:54:27 -0800 (PST)
Message-ID: <20030318165427.52097.qmail@web12703.mail.yahoo.com> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <20030318165427.52097.qmail@web12703.mail.yahoo.com>
Permalink:  ../20030318165427.52097.qmail@web12703.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030318165427.52097.qmail@web12703.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: chestercyoung@yahoo.com
  Subject: Re: outer join versus not exists
  In-Reply-To: <20030318165427.52097.qmail@web12703.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox