1、select * from a where title ="hello"
title 列上没有索引,是不是主要查询用到的列上没有索就,就会全表扫描
这条语句会全表扫描吗?
2、select * from a where title ="hello" and name = 'test';
name 上有索引,title上没有,这条语句会全表扫描吗?
以上二个问题能解释一下原因最好了
...全文
1102打赏收藏
什么情况下执行全表扫描
1、select * from a where title ="hello" title 列上没有索引,是不是主要查询用到的列上没有索就,就会全表扫描 这条语句会全表扫描吗? 2、select * from a where title ="hello" and name = 'test'; name 上有索引,title上没有,这条语句会全表扫描吗? 以上二个问题能解释一下原因最好了