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