Result fast

Result fast

 

  





Dear All,



I wrote a query like following query method but which is
correct? In where condition which should come first?

Please explain some one.





Select A.* from a,b

Where a.col1=b.col1 and b.col2 in (A,b,c) or a.col2 in (Q,R,S)
and a.col3 =2 and b.col4=8





Select A.* from A

Inner join b on a.col1=b.col1 and b.col2 in (A,b,c) or a.col2 in
(Q,R,S) and a.col3 =2 and b.col4=8



Select A.* from A

Inner join b on a.col1=b.col1

where b.col2 in (A,b,c) or a.col2 in (Q,R,S) and a.col3 =2 and b.col4=8





I need fast result.





Thanks & Regards,

JSaraboji,

MSSQL - DBA Direction Software Solutions,

Contact : +91 22 66615000. EXT 336

E-Mail : j.[Email address protected]




MS Sql Server LazyDBA home page