您的位置:首页 > 数据库 > Oracle

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好很多!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐