oracle优化

前端之家收集整理的这篇文章主要介绍了oracle优化前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1数据量比较小的表放在前边:

select n.applyid from re_newafterloan n inner join re_apply a on a.applyid=n.applyid;

select n.applyid from re_apply a inner join re_newafterloan n on a.applyid=n.applyid;

2整合sql,减少数据库的访问次数

select count(*) from re_bizcodecfg b where b.bizcodetype='zhonghang' ; select count(*) from re_bizcodecfg b where b.bizcodetype='signingModel' ; 整合后 select count(decode(bizcodetype,'zhonghang','x',null)) as avic,count(decode(bizcodetype,'signingModel','y',null)) as models from re_bizcodecfg

原文链接:https://www.f2er.com/oracle/208579.html

猜你在找的Oracle相关文章