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

如何让oracle的select强制走索

例如:

select /*+INDEX(xe emp_postproperty)*/  * from xemployee xe where xe.POSTPROPERTY=‘1‘

 

 

格式:

 

1、/*+INDEX(xe emp_postproperty)*/  这里的/*...*/中间不要有空格

 

2、表名要用别名,即:以上面的sql语句为例,要使用xe ,而不是xemployee 

3、数据类型不同也会影响索引,例如 where xe.POSTPROPERTY=‘1‘ where xe.POSTPROPERTY=1

 

如何让oracle的select强制走索

标签: