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
Cc: Tomasz Myrta <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 19:02:39
Message-ID: 200212191102.39785.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
Tomasz,

> > This will not get you the same result as the above.  It will get you
> > all rows from t+f where a record is present in f and has (or does not
> > have) a NULL value for f.id.   While this type of query works in MS
> > Access, it will not work in SQL92/99-commpliant databases.
> 
> filter_table does not contain null fields. It has only two states: it
> has row
> or it hasn't row coresponding to row in some_table.
> 
> And now, which one is better?

You're not listening.  I said that LEFT JOIN won't work.  At all.

Please re-read the paragraph above, which explains why.

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco


In response to

Responses

pgsql-performance by date

Next:From: Manfred KoizarDate: 2002-12-19 19:07:53
Subject: Re: 4G row table?
Previous:From: Joe ConwayDate: 2002-12-19 17:43:24
Subject: Re: EXISTS vs IN vs OUTER JOINS

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