我想知道以下内容在性能上是否有区别
SELECT ... FROM ... WHERE someFIELD IN(1,2,3,4)
SELECT ... FROM ... WHERE someFIELD between 0 AND 5
SELECT ... FROM ... WHERE someFIELD = 1 OR someFIELD = 2 OR someFIELD = 3 ...
或者MySQL会像编译器优化代码一样优化SQL吗?
将AND
更改为OR
,原因在评论中说明。