下面几种情况如何加索引
下面几种情况 mysql如何加索引
1 select * from a where id=1 and email='212@163.com' order by name
2 select * from a where id=1 and email='212@163.com' group by firstname, secondname order by name
3 select * from a where id=1 and email='212@163.com' group by firstname, secondname
4 另外一般情况下 已经有索引的字段最好不要有null值,但是历史遗留的很多表实际上有索引的字段值中存在大量的nulll值
现在不能修改缺省的null, 清问在这些字段上sql语句会走索引吗?