oracle里not exists和not in 性能测试_sailorhu的记事本

来源:百度文库 编辑:神马文学网 时间:2024/05/24 01:45:04
2008-07-16 15:28 http://hi.baidu.com/sailorhu/blog 

今天针对oracle里面not in 和not exists专门做了个性能测试:

条件:oracle10g,表A 有记录数3243条,表B有记录数943条。

测试工具:Yourkit 6.0 。

测试sql如下

select * from A where not exists ( select * from B where A.id = B.id )和

select * from A where A.id not in ( select * from B)

not exists 的结果如下图:执行了 193 ms