Re: Tune query with "NOT IN"

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 12 Apr 2002 07:39:39 -0700
Message-ID: <a20d28ee.0204120639.4074eba1_at_posting.google.com>


brotherhou_at_yahoo.com (konghou) wrote in message news:<c19678a1.0204120116.66434be8_at_posting.google.com>...
> How to tune the query:
> select .... where (f1, f2) not in (select f3, f4 from ... )
> A "not exist" seems working as slow.

try using
... not in (select /*+ hash_aj(<tablename or alias>) f3, f4 ...)

--
Hth

Sybrand Bakker
Senior Oracle DBA
Received on Fri Apr 12 2002 - 16:39:39 CEST

Original text of this message