JOIN has better performance than sub-query.
For your instance, you can get even better performance than JOIN if you
query like this:
select t1.a from t1
where exists ( select t2.ab from t2 where t2.b=0 and t2.ab = t1.b )
if t1 and t2 are very large tables, you will benifit a lot. Otherwise,
forget it, no difference.
George S. Z
"TH" <th_at_cogito.greatdanedk> wrote
Quote:
Very nice description.
Thanks!
--
TH
Pffmppppmppffpmmpp fmpmfpmpp mpmppfmfm
mmpmppmpfppfpffmpp pffmpppfmpmfffmmffpppmfm...
http://www.namesuppressed.com/kenny/ |