Which is faster?

Which is faster?

 

  

Hi Gurus,

Which is faster - a subquery or a join ?

select groupid,ob
jectid from egmemberobject
where groupid in (select groupid from eggroup where grouptype=2)

select a.groupid,a.objectid from egmemberobject a, eggroup b
where a.groupid=b.groupid
and b.grouptype=2

Could somebody please list or site examples of specific cases when you would
use one over the other despite the performance issues?

thanks,

Varsha Savyasachi



MS Sql Server LazyDBA home page