Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Function Based Index - Not Used ???
Guys,
create table Tab1 ( name varchar2(100),age int,state varchar2(100),country varchar2(100));
insert into tab1 values ('SCOTT',25,'TN','India');
I have 20,00,000 records like above.
create index idx1 on tab1 (upper(name));
analyze table tab1 compute statistics;
analyze index idx1 compute statistics;
select age from tab1 where upper(name)='SCOTT'; ---> this will return around 50 records.
When i add a HINT, IDX1 is used.Why is it so ? Why this SELECT does not use index IDX1 w/o a hint ?
TIA.
Jp.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Prem Khanna J
INET: jprem_at_kssnet.co.jp
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 Thu May 29 2003 - 01:54:50 CDT