1、select * from userinfo where user='abc'; 2、select * from userinfo where user='abc' or user='123'; 4、select * from userinfo where user like 'ab%c'; 5、select * from userinfo where user like 'abc%'; 这些可以用上。 具体为什么,建议你还是看MYSQL官方免费手册中的优化那个章节。一两百个字估计无法讲清楚。
2、select * from userinfo where user='abc' or user='123';
4、select * from userinfo where user like 'ab%c';
5、select * from userinfo where user like 'abc%';
这些可以用上。 具体为什么,建议你还是看MYSQL官方免费手册中的优化那个章节。一两百个字估计无法讲清楚。
select * from userinfo where user='abc' and pass='123' ,这两个sql语句用到上面的索引了吗?