Sami, Your problem is not with the index, but rather the cost based optimizer. Most of us have been beat severely over the head and shoulders through the years that full table scans are a BAD thing, me included BTW. Well, it's time for the old dog to learn new tricks. So that I'm not a long winded person, take a look in Select magazine, 3rd qtr 2003, for the article "In Defense of Full Table Scans" by Jeff Maresh. For a long time the CBO was a mystery to me as well especially when it did unexpected things like this. I've applied Jeff's ideas on computing an index's efficiency to see if it explained what the CBO did. Amazingly in 95% of the cases I've analyzed it made absolute sense.
I'm including Jeff with a courtesy copy of this message so that 1) I can pat him for making the waters clear and 2) so he can add anything he desires. Dick Goulet Senior Oracle DBA Oracle Certified 8i DBA -----Original Message----- Sent: Wednesday, November 05, 2003 12:10 PM To: Multiple recipients of list ORACLE-L Hi List, Does someone throw ligts on the following index behavior Note a)"name" is an unique index column b) table and index has been analyzed b4 running the query 1) select id from table1 where name like 'ABC%'; FULL Table scan 1) select id from table1 where name like 'AB%'; Index scan "name" is an unique index column Any help would be really appreciated. -Sami -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Saminathan INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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: Goulet, Dick INET: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (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).