标签: mysql sql query-optimization
可能重复: Why would an IN condition be slower than “=” in sql?
执行之间是否有任何性能差异:
SELECT foo FROM bar WHERE id IN (4)
对战
SELECT foo FROM bar WHERE id = 4
答案 0 :(得分:0)
我相信MySQL优化器会将id IN(4)转换为id = 4,因此没有性能差异