oracle 语句优化问题select nvl(sum(a.sl),0),nvl(sum(a.je),0)from tablea aleft join tableb bon a.zd = b.zdwhere a.zd2 in ('181','180','179','178','177','176','175')and nvl(b.zd3,'xx') = 'xx'类似这样的语句 zd、zd2是字段 都有索引在p

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/22 22:50:24
oracle语句优化问题selectnvl(sum(a.sl),0),nvl(sum(a.je),0)fromtableaaleftjointablebbona.zd=b.zdwherea.zd2in

oracle 语句优化问题select nvl(sum(a.sl),0),nvl(sum(a.je),0)from tablea aleft join tableb bon a.zd = b.zdwhere a.zd2 in ('181','180','179','178','177','176','175')and nvl(b.zd3,'xx') = 'xx'类似这样的语句 zd、zd2是字段 都有索引在p
oracle 语句优化问题
select nvl(sum(a.sl),0),nvl(sum(a.je),0)
from tablea a
left join tableb b
on a.zd = b.zd
where a.zd2 in ('181','180','179','178','177','176','175')
and nvl(b.zd3,'xx') = 'xx'
类似这样的语句 zd、zd2是字段 都有索引
在plsql的解释计划里看 耗费、基数都很小 但是查询速度极慢
我不是知道不是没走zd2 zd3 自己的索引.
有没有什么优化方法 实在太慢了

oracle 语句优化问题select nvl(sum(a.sl),0),nvl(sum(a.je),0)from tablea aleft join tableb bon a.zd = b.zdwhere a.zd2 in ('181','180','179','178','177','176','175')and nvl(b.zd3,'xx') = 'xx'类似这样的语句 zd、zd2是字段 都有索引在p
把 nvl(b.zd3, 'xx') = 'xx' 改为 and ( b.zd3='xx' or b.zd3 is null )
这样就走zd3的索引了,先处理左边的话就不走zd3的索引了

oracle 语句优化问题select nvl(sum(a.sl),0),nvl(sum(a.je),0)from tablea aleft join tableb bon a.zd = b.zdwhere a.zd2 in ('181','180','179','178','177','176','175')and nvl(b.zd3,'xx') = 'xx'类似这样的语句 zd、zd2是字段 都有索引在p oracle查询语句 select a||','||b||','||c from table where a in('m','n') oracle sql语句获取前两条数据select id,seq from hzds_admin where seq oracle 中见到一个查询语句,select /*+ index(t1) */ from t1 .,其中/*+ oracle 语句 查询优化select count(*),sum(bal) from rpt_xd where substr(beg_date,5,2)= substr('20130131',5,2) and substr(beg_date,1,4)=substr('20130131',1,4) and term_mon3 and term_mon6 and term_mon12能不能帮我弄成一句话啊 这样分着 帮我看看这个oracle语句,select groupid,parentid,groupname,isleaf,description,sharerankid,statusid,corporationid,staffid,isactual,groupcount,level FROM (SELECT a.*,b.groupcount FROM teabgroup a,(SELECT groupid,count(*) groupcount FROM teabmembe 实现关系代数表达式的优化算法 .输入:关系代数表达式或SELECT查询语句 输出:优化后的关系代数表达式 oracle length函数select area_code,area_name from dict_area where length(area_code)=4 ORDER BY area_code asc这句sql语句中的where length(area_code)=4是什么意思? oracle有and not这个用法吗语句:select a.* from a where a.num='12' and a.name='34'其中and后面加个not 两条Oracle取第一条语句的区别select top 1 * from table order by a andselect * from (select * from table order by a )C where rownum=1 oracle查询一个表,select * from a 所有的字段都是浮点型,想保留3个小数,怎么写语句?类似select round(*,3) from a,还是怎么写? oracle中的rownum属性在where语句中大于号不起作用SELECT * FROM abc where rownum > 8这样没有结构SELECT * FROM abc where rownum < 12 这样就行 大于8的都没有小于12的竟然有..... oracle 多表查询速度太慢.求帮我优化一下select jbjxxid,anjianmingcheng,JBJXXSLBH,SARJBXXID,SARMC,JBDWMC from tb_jbjxx,tb_ajjbxx,tb_sarjbxx,tb_xyr,tb_chengbaoxinxiwhere tb_jbjxx.JBJXXID=tb_ajjbxx.JBJXXSLBH or tb_ajjbxx.QTRYXXSLBH=tb_sarjb oracle 优化查询效率select t.dwmc,t.zgjl,t.zbjl,t.zqjl,t.xljl,t.skjl,t.bgjl, t.bqjl,t.bgjl2,t.pxjl,t.ccjl, (zbjl+zqjl+xljl+skjl+bgjl+bqjl+bgjl2+pxjl+ccjl) as hz from (select code_mean as dwmc, (select count(*) from tableoneb, tabletwo a w insert into REC_OVER(ORG_ID) select '1' from dual where not exists (select ORG_ID from REC_OVER )insert into REC_OVER(ORG_ID) select '1' from dual where not exists (select ORG_ID from REC_OVER ) 请问oracle里这样的语句,为什么在sql/plus可 oracle表名中带@什么意思,例如:select * from dim.dim_area_no@to_dw vb select case 这个语句? 浅析ORACLE数据库的优化方案如何翻译