select * from table where a = 1 and b = 2
select * from table where a = 1
select * from table where b = 2
我这个表的查询以上三种情况比例差不多,查询量比较大我做索引时候是做三个索引吗a, b做一个
a做一个
b做一个还是只做两个就可以了
a做一个
b做一个