1、select * from a where title ="hello"
title 列上没有索引,是不是只要查询用到的列上没有索引,就会全表扫描
这条语句会全表扫描吗?
2、select * from a where title ="hello" and name = 'test';
name 上有索引,title上没有,这条语句会全表扫描吗?
是不是没有索引就会全表扫描?
...全文
3114打赏收藏
什么情况下全表扫描
1、select * from a where title ="hello" title 列上没有索引,是不是只要查询用到的列上没有索引,就会全表扫描 这条语句会全表扫描吗? 2、select * from a where title ="hello" and name = 'test'; name 上有索引,title上没有,这条语句会全表扫描吗? 是不是没有索引就会全表扫描?