如何优化此查询?
DELETE FROM item WHERE id = 1002;
DELETE FROM item WHERE id = 1003;
DELETE FROM item WHERE id = 102232;
DELETE FROM item WHERE id = 12322;
这是一条出路?
DELETE FROM item WHERE id = 1002 OR id = 1003 OR id = 102232 OR id = 12322;
我非常需要专家的心思!
答案 0 :(得分:2)
DELETE FROM item WHERE id IN (1002,1003,102232,12322)
它更简单,但你的意思是优化(更快?)