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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-performance by date

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