EXISTS vs IN vs OUTER JOINS - Mailing list pgsql-performance

From Tomasz Myrta
Subject EXISTS vs IN vs OUTER JOINS
Date
Msg-id 3E019B71.5050901@klaster.net
Whole thread Raw
Responses Re: EXISTS vs IN vs OUTER JOINS
List pgsql-performance
Hi
Few days ago I read, that EXISTS is better than IN, but only if there
are many records (how many?). I was wondering which one is better and
when. Did anyone try to compare these queries doing the same work:

- select * from some_table t
     where t.id [not] in (select id from filter);
- select * from some_table t
     where [not] exists (select * from filter where id=t.id);
- select * from some_table t
    left join filter f using (id)
   where f.id is [not] null;

Regards,
Tomasz Myrta


pgsql-performance by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: Profiling
Next
From: "Josh Berkus"
Date:
Subject: Re: EXISTS vs IN vs OUTER JOINS