Swati Agarwal
Which will be faster out of these two queries - one with OR or one with IN?
Posted by Swati Agarwal in SQL Server on Nov 21, 2012
  • 0
  • 2
  • 1111
Do you know the answer for this question? Post it below.
Guest
Posted by Ajay suwalka on May 06, 2013
  • 0

Almost no difference.. Just checked it on 65000 rows with random values.

Values are compared separately at run time whether they are using IN CLAUSE or using OR CLAUSE in query sql server usage same mechanism for both.

Posted by Mahesh Patel on Nov 27, 2012
  • 0

IN.

Because While you use "OR" condition that means your sql select two set of record of index while "IN" is select one record set as per index


PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | ABOUT US | REPORT ABUSE
2014© C# Corner. All contents are copyright of their authors.