mysql in查询优化


mysql大量in优化

1
select * from a where b in();
1
2
3
4
使用unionall代替in
select * from a where b = '1'
union all select * from a where b = '2'