| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> NOT IN/Nulls/ NOT EXISTS
which would you normally expect to work quicker and why? ie how does
the using of NOT EXISTS compare with the using of Nulls
1)
select count(*) from (
SELECT distinct sourceid, strategy, strategyname, area, product
FROM t_bookmap
WHERE SourceId = 1 AND not exists(select strategy from
ta_strategy where SourceId = 1 AND TA_STRATEGY.strategy =
T_BOOKMAP.strategy)
2)
select count (*) from (
SELECT distinct T.sourceid, T.strategy, T.strategyname, T.area,
T.product
FROM t_bookmap T, (select strategy from ta_strategy where sourceid = 1) TA
WHERE T.SourceId = 1 AND TA.strategy(+) = T.strategy AND
TA.strategy is NULL
)
Received on Fri Jul 06 2007 - 03:07:53 CDT
![]() |
![]() |