Re: SQL*PLUS and INDEX

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: Fri, 24 Nov 2000 08:35:36 -0800
Message-ID: <t1t653ho49t164_at_corp.supernews.com>


"gg" <gianpaolo.giliberto_at_tiscalinet.it> wrote in message news:8vlvs1$rjs$1_at_lacerta.tiscalinet.it...
> Hy,
> we have a table k with a index on 3 fields
> (x,y,z in this order) and
> sometime we have to execute a query like this:
>
> select ..
> from k
> where
> x in (select ... from ....) and
> y=.. and
> z=.....;
>
> Do we use the index with this query ?
>
> Thanks.
> Goodbye
> gianpaolo.giliberto_at_tiscalinet.it

Most likely no. If 'x' is in table 'k' then you probably need to query where [Quoted] 'x' is a particular value rather than using a subquery. Subqueries are killers and should be avoided wherever possible.

-Matt Received on Fri Nov 24 2000 - 17:35:36 CET

Original text of this message