查询语句的优化问题,急,火急!!! select /*+index(h)*/e,f,f into v_e,v_f,v_f from Table where (f between substr(y,1,4)||'01' and substr(y,1,4)||'12') and e=x and g=z;应该会快点 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 where (f between substr(y,1,4)||'01' and substr(y,1,4)||'12') and e=x and g=z;条件按照上边的写没错,关键是(f between substr(y,1,4)||'01' and substr(y,1,4)||'12')这一句永不上索引的,所以你的索引应该只建立(g,e)就行了,只要(g,e)能够确定的范围很小就能够速度很快 你使用了substr,但你的索引只对字段建立,所以你用不上,你可以照楼上方法改进,也可以建一个函数索引。 新手求助 很菜的问题 多线程处理ORACLE数据库数据 关于 APPEND 什么时候用 向大家请教Oracle+Windows advance server+磁盘阵列柜的双机安装方法,不知哪位可以教我,或发个电子文档给我,谢谢! (100分)oralce 8.1.7 在red hat linux 7.2下安装出现“虚拟机初始化。。。”问题???急,在线等待 请问这样一个sql语句该怎么写 oracel 中有没有“级联更新”的概念? 如何判断一条记录是否被引用 ORACLE9I 拼接SQL语句 求:一个困扰我的问题 求教一个高难度sql语句(不知道可不可以用sql实现)!
where (f between substr(y,1,4)||'01' and substr(y,1,4)||'12')
and e=x
and g=z;
条件按照上边的写没错,关键是(f between substr(y,1,4)||'01' and substr(y,1,4)||'12')这一句永不上索引的,所以你的索引应该只建立(g,e)就行了,只要(g,e)能够确定的范围很小就能够速度很快