Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Index Behaviour
Dave,
I think <> is like using the NOT operator, thus an index can not be used.
Think about it - your asking the optimizer to find records in the index that are not there - nothing to really search on - so it does a FTS.
Now if you did
select surnam from basic where membno between 0 and 9
or membno between 10 and 10000
it might work as expected.
hope this helps
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
Sent: Friday, July 06, 2001 12:53 PM
To: Multiple recipients of list ORACLE-L
Hi,
In the following query "membno" is a Non Unique Indexed field:
select surnam from basic where membno <> 10.
Whether the table is analyzed or not the Explain Plan still shows a Full Table Scan unless I specify a Hint to use the Index. Using the index is more costly so I would expect CBO to always do a FTS unless the hint is specified. But without a hint why does RBO do a FTS and ignore the index?
Platform NT
Version 8.1.7.0.0
Optimizer Mode is Choose:
Many thanks for any replies
Dave Leach
PS. Like the Bear stories, being brought up in London we miss out on all this.
Internet communications are not secure and therefore this Company does not accept legal responsibility for the contents of this message.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
Claybrook Computing Limited is a subsidiary of
Claybrook Computing (Holdings) Limited
Registered Office: Abbey House. 282 Farnborough Road, Farnborough,
Hampshire GU14 7NJ
Registered in England and Wales No 1287205
A Hogg Robinson plc company
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------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).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------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 Fri Jul 06 2001 - 13:38:40 CDT
![]() |
![]() |