oracle not in query takes longer than in query -


i have 2 tables each has 230000 records. when make query:

select count(*)  table1  field1 in (select field2 table2).  

it takes 0.2 second.

if use same query changing in not in

select count(*)  table1  field1 not in (select field2 table2).  

it never ends.

why ?

its better user not exists, not in uses row search takes long


Comments

Popular posts from this blog

arrays - PHP Shopping Cart Variable and Object errors -

mysql - java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0) -