oracle 两种方法不同的效率!务必少使用 not in
2007-01-25 17:43
716 查看
两种方法不同的效率!
方法1
select * from userinfo,achieveamount where userinfo.unionid = achieveamount.unionid(+) and achieveamount.unionid IS NULL
方法2
select * from userinfo where userinfo.unionid not in (select achieveamount.unionid from achieveamount)
我们要采用方法1这样性能要比2好很多!
方法1
select * from userinfo,achieveamount where userinfo.unionid = achieveamount.unionid(+) and achieveamount.unionid IS NULL
方法2
select * from userinfo where userinfo.unionid not in (select achieveamount.unionid from achieveamount)
我们要采用方法1这样性能要比2好很多!
相关文章推荐
- 用两种不同的方法导出ORACLE 查询数据为CSV 文件 (python 代码 与 使用 utl_file 包)
- 两种不同的方法使用不当Animation 四个动画效果Alpha.Scale.Rotate.Translate
- android新特性: 底部导航栏BottomNavigationView系统库与第三方库的两种不同库的使用方法
- Oracle 查看表空间的大小及使用情况sql语句和oracle增加表空间大小两种实现方法
- 算法导论学习心得1-----插入排序及两种不同插入方法的效率比较
- php的autoload大致可以使用两种方法:__autoload和spl方法。这两种方法又各有不同的几种使用方法
- oracle的case when有两种使用方法
- Oracle获取LOB长度的两种方法效率对比
- 使用Oracle的instr函数与索引配合提高模糊查询的效率 一般来说,在Oracle数据库中,我们对tb表的name字段进行模糊查询会采用下面两种方式: 1.select * from tb wh
- oracle两种临时表的创建及使用方法
- android新特性: 底部导航栏BottomNavigationView系统库与第三方库的两种不同库的使用方法
- MyBatis中<collection>的两种使用方法,及效率比较
- 使用jdbc连接上oracle的两种方法
- oracle中用sql分页的两种方法
- ORACLE PL/SQL 中序列(sequence)的简易使用方法介绍
- 在URL中传带百分号%的参数的两种方法:直接传编码或使用encodeURI
- Oracle的to_char函数使用方法
- Oracle的to_char函数使用方法
- Android 效率开发之EventBus新使用方法
- 在linux下使用jlink有两种方法