Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Index usage
You answered your own question.!
ta.c3 is a nonindexed column, this means that the only way to satisfy the
predicate is to perform a full table scan. Since this predicate condition forces
a full table scan on ta, which will retrieve the ta.c1 column values at the same
time, there is no need to use an index. In fact, an additional index access
would decrease the query performance.
Daniel Fink
bhabani s pradhan wrote:
> Hi All,
>
> Merry Christmas to all.
>
> I have this interesting problem..
>
> For this query index ind1 on (c1,c2) columns is getting used.
> SELECT 'x'
> FROM tab ta
> WHERE ta.c1='val1';
> (gives index ind1 range scan)
>
> But for
>
> SELECT 'x'
> FROM tab ta
> WHERE ta.c1='val1'
> AND ta.c3 = 'val2';
> (gives FTS)
> index ind1 is not being used. c3 is a nonindexed column.
>
> I have already tried index(ta ind1) , RULE hints.
>
> The table and the index are analyzed.
>
> What cud be the reason for that?
>
> Regards,
> B S Pradhan
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Daniel W. Fink
INET: Daniel.Fink@Sun.COM
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: anu INET: anu_77_d_at_yahoo.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Dec 24 2003 - 10:04:24 CST