IN or OR, Which one has better performance? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

IN or OR, Which one has better performance?

10th Feb 2016, 6:56 PM
Marcos Ramos
5 Answers
+ 2
IN's performance will be much better than or because IN fetches all the records simultaneously but OR will apply filters one by one.
13th Jul 2016, 9:34 AM
Suryaprakash Tiwari
Suryaprakash Tiwari - avatar
0
I think IN. Because it will be easy to render from single line than from one by one. And for us, it's easy to maintain and understand
2nd Apr 2016, 5:15 AM
Kishor Tiwari
Kishor Tiwari - avatar
0
Remember use the simbols "(" and ")" when you use IN and OR, they are very useful
23rd Jun 2016, 6:58 PM
Algedi J Barrios
0
IN is better when you have multiple values to check while OR is used for one or two values as it can make a query full of redundant syntax
26th Jun 2016, 6:18 PM
Vinayak Mahajan
Vinayak Mahajan - avatar
0
IN
25th Jul 2016, 10:14 AM
Ahmed Babiker Abdalla
Ahmed Babiker Abdalla - avatar