输入banner图图片脚本导航/分类

数据库全表扫描的SQL种类

1.所查询的表的条件列没有索引;

2.需要返回所有的行;

3.对索引主列有条件限制,但是使用了函数,则Oracle 使用全表扫描,如:

where  upper(city)=’TOKYO’; 

这样的语句不会使用索引方法。所以就只能全表扫描。

4.带有 is null 和is not null 及 != 等子句。如:

. . . where  city is  null ;

. . . where city is  not  null;

. . . where  city != ‘TOKYO’;

5.带like  并使用’%’这样的语句就使用全表扫描;

 

数据库全表扫描的SQL种类

标签:数据   返回   使用   upper   需要   content   label   全表扫描   and