摘要: 基础语法:not in的写法中,内外表都要全表扫描select count * from test where object_name not in (select object_name from test2);not exists的写法中,内层表子查询可以走索引select count * from test2 t2 where not exists(select 1 from test t1 where t1.object_name=t2.object_name );(object_name上建有有索引)执行计划:再来看一下CBO模式下的情况:SQL> select * from 阅读全文
posted @ 2012-11-14 15:28 Jeok 阅读(343) 评论(0) 推荐(0) 编辑