Skip site navigation (1) Skip section navigation (2)

Re: EXISTS vs IN vs OUTER JOINS

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: jasiek(at)klaster(dot)net, Josh Berkus <josh(at)agliodbs(dot)com>
Cc: jasiek(at)klaster(dot)net,PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: Re: EXISTS vs IN vs OUTER JOINS
Date: 2002-12-19 23:19:21
Message-ID: web-2292427@davinci.ethosmedia.com (view raw or flat)
Thread:
Lists: pgsql-performance
Tomasz,

> I read your mail once again, but I still don't understand what are
> you
> talking about.
> I'll write example - maybe it will help us to understand each other.

Hmmm ... you're right.  Sorry for being dense.  It shouldn't work, but
it does.  

Tom, Bruce:

If I run the query:

SELECT t1.* 
FROM table1 t1
  LEFT JOIN table2 t2 ON t1.xid = t2.xid
WHERE t2.label IS NULL

I will get rows in t1 for which there is no row in t2.  This does not
seem SQL-spec to me; shouldn't I get only rows from t1 where a row
exists in t2 and t2.label IS NULL?

-Josh

In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2002-12-20 00:02:13
Subject: Re: EXISTS vs IN vs OUTER JOINS
Previous:From: Bruce MomjianDate: 2002-12-19 22:52:24
Subject: Re: EXISTS vs IN vs OUTER JOINS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group