Re: More Variations on NOT IN problem

From: Pedro Bandeira <pbandei>
Date: 1995/08/01
Message-ID: <3vlsq9$cp9_at_midgard.calvacom.fr>#1/1


<esanderl_at_explorer.csc.com> wrote:
>Primary key is a three field composite for OPLAN_FORCE_RQMT_LOC;
>OP_PLN_ID is the only field of those three used. Probably the reason for
>the range search on the index..?!
>TIA for you answer
>
>Ed Sanderlin
>
>
>

Correct. I suppose this colonne is the leading one in the index. I've seen some posts stating that NOT IN operators always force full table scans. This example shows that this is not true. Usually, however, NOT IN is less efficient than NOT EXISTS because using NOT EXISTS implies adding a join condition to the subquery, and therefore an additional condition which can make all the difference between using an index and doing full scans. Clear enough?

Regards,

    Pedro Received on Tue Aug 01 1995 - 00:00:00 CEST

Original text of this message