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


From: jasiek(at)klaster(dot)net
To: Josh Berkus <josh(at)agliodbs(dot)com>
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 17:27:33
Message-ID: 20021219172733.GA1001@serwer (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Thu, Dec 19, 2002 at 09:15:36AM -0800, Josh Berkus wrote:
> > -select * from some_table t
> >    left join filter f using (id)
> >   where is [not] null;
> 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   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?

Tomasz Myrta

In response to


pgsql-performance by date

Next:From: Joe ConwayDate: 2002-12-19 17:43:24
Subject: Re: EXISTS vs IN vs OUTER JOINS
Previous:From: Josh BerkusDate: 2002-12-19 17:15:36
Subject: Re: EXISTS vs IN vs OUTER JOINS

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