"in" Example:
select * from t where something in ('a', 'b', 'c')
"or" Example:
select * from t where something='a' or something='b' or something='c'
Is there an efficiency difference between these two? Or they are the same under the hood?
"in" Example:
select * from t where something in ('a', 'b', 'c')
"or" Example:
select * from t where something='a' or something='b' or something='c'
Is there an efficiency difference between these two? Or they are the same under the hood?
This depends largely on databases and optimizers. Best way to see explain plan for both queries. For smaller number of values it does not matter much but as number of values increases then IN clause usually outperforms OR.
This answer has great insight and comparison for different databases for in and or.