| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: optimal sql
NOT IN becomes very inefficient for many values.
try NOT EXISTS instead.
Martin Doherty
Christoph Seidel wrote:
>how can i find all records by pk in table 1 which are not in table 2
>
>is this efficient:?
>
>select * from t1 where pk not in (select pk from t2)
>
>
>
>
Received on Mon Dec 09 2002 - 05:13:48 CST
![]() |
![]() |