sql语句,例:
select a,b from test where (a = 1 and b = 2) or (a = 3 and b = 4) or (a = 5 and b = 6) or (a = 9 and b = 10);
优化后:
select a,b from test where (a,b) in ((1,2),(3,4),(5,6),(9,10));
sql语句,例:
select a,b from test where (a = 1 and b = 2) or (a = 3 and b = 4) or (a = 5 and b = 6) or (a = 9 and b = 10);
优化后:
select a,b from test where (a,b) in ((1,2),(3,4),(5,6),(9,10));