Re: Why does NOT IT take so long

From: Roger Snowden <snowden_at_haven.ios.com>
Date: 1995/07/24
Message-ID: <3v0u44$ek7_at_news.ios.com>#1/1


Jim Smith (Jim_at_jimsmith.demon.co.uk) wrote: : In article <3uu80q$2nj_at_explorer.csc.com> tconder_at_csc.com "Tom Conder" writes:
: > When writing Oracle SQL, why does the NOT IN statement take so long?
 

: ... where this_id not in
: (select other_id from other table...)

I wonder if you could clarify this for me. I have a similar situation where the sub-query takes less than two seconds in sqlplus to get 250 rows. The main table has about 100,000 rows. Does the subquery actually execute for each row of the main table? For example:

select count(*) from dbown.donor where
dbown.donor.donorid not in (
select * from dbown.flagview)

dbown.flagview only has 250 rows. Does this not get chached and compared to dbown.donor?

Roger Received on Mon Jul 24 1995 - 00:00:00 CEST

Original text of this message