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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 06:54:00
oracle优化查询效率selectt.dwmc,t.zgjl,t.zbjl,t.zqjl,t.xljl,t.skjl,t.bgjl,t.bqjl,t.bgjl2,t.pxjl,t.ccjl,(zbj

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
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 where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd') and b.zgzt in('0101','0102','0103','0104','0205','0206','0105')) zgjl ,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0102' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) zbjl,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0103' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) zqjl,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0205' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) xljl,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0206' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) skjl,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0101' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) bgjl,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0104' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) bqjl,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0105' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) bgjl2,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0201' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) pxjl,
(select count(*) from tableoneb, tabletwo a where a.leader_code=b.leader_code and a.tabletwo99<'5' and b.zgzt='0202' and b.szdwdm=code and to_char(b.rq,'yyyy-MM-dd')=to_char(sysdate,'yyyy-MM-dd')) ccjl
from zb02_jgmc where code like '500107%' ) t
如何提高查询效率.请说明具体.谢谢.

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
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 CASE WHEN B.ZGZT IN('0101', '0102', '0103', '0104', '0205', '0206', '0105') THEN COUNT(*) AS zghl,
CASE WHEN B.ZGZT IN('0102') THEN COUNT(*) AS ZBJL,
CASE WHEN B.ZGZT IN('0103') THEN COUNT(*) AS ZQJL,
CASE WHEN B.ZGZT IN('0205') THEN COUNT(*) AS WXJL,
CASE WHEN B.ZGZT IN('0206') THEN COUNT(*) AS SKJL,
CASE WHEN B.ZGZT IN('0101') THEN COUNT(*) AS BGJL,
CASE WHEN B.ZGZT IN('0104') THEN COUNT(*) AS BQJL,
CASE WHEN B.ZGZT IN('0105') THEN COUNT(*) AS BQJL2,
CASE WHEN B.ZGZT IN('0201') THEN COUNT(*) AS PXJL,
CASE WHEN B.ZGZT IN('0202') THEN COUNT(*) AS CCJL
FROM TABLEONEB, TABLETWO A
WHERE A.LEADER_CODE = B.LEADER_CODE
AND A.TABLETWO99 < '5'
AND B.SZDWDM = CODE
AND TO_CHAR(B.RQ, 'yyyy-MM-dd') =
TO_CHAR(SYSDATE, 'yyyy-MM-dd')
) A
FROM ZB02_JGMC
WHERE CODE LIKE '500107%') T

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 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 a||','||b||','||c from table where a in('m','n') oracle 中见到一个查询语句,select /*+ index(t1) */ from t1 .,其中/*+ oracle 子查询:select *,(select account from t_ps_member m where m.mid = po.mid) account from t_ps Oracle中的EXISTS与IN我看到有的帖子上说Oracle SQL中尽量用EXISTS代替IN,但我后来看应该准确讲是:对于带有子表查询的情况,使用EXISTS效率要高于IN,但如果仅仅是字段选择,例如:select * from table whe 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 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在做查询的时候,使用 where 条件过滤 是 or 的效率高 还是 in 的效率高? oracle中的集合操作符的查询效率和and、or相比,有什么不同么,为什么? 实现关系代数表达式的优化算法 .输入:关系代数表达式或SELECT查询语句 输出:优化后的关系代数表达式 oracle查询一个表,select * from a 所有的字段都是浮点型,想保留3个小数,怎么写语句?类似select round(*,3) from a,还是怎么写? oracle表名中带@什么意思,例如:select * from dim.dim_area_no@to_dw 浅析ORACLE数据库的优化方案如何翻译 Oracle查询条件的检索顺序 select * from tabel_1 t where t.aa like '%aaa%' and t.bb like '%ccc%'请问:就上述语句,Oracle的机制会怎样查找符合条件的结果1:先找到符合 bb like ccc 的结果,再从该结果中找 aa lik 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 如何优化课堂结构,提高课堂教学效率 如何优化课堂结构,提高课堂教学效率