Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Wrong index used

Wrong index used

From: <kivi_at_hotmail.ru>
Date: 18 May 2001 08:24:37 GMT
Message-ID: <9e2m85$rpp$1@news.netmar.com>

Hello Oracle Gurus!

We faced a problem recently
after we rebuild the table and it's indexes (did 'insert select' with indexes created in the new table and then renamed it ). The reason for rebuild that we started to get 'sort key to long' while trying to rebuild indexes.

after we rebuild the table we found that many queries start to select wrong indexes to search.

Say we have fields A B C and D
and have indexes on A and and B,A

when we select 'A from tabl where A=something' it make a full index scan on index (B,A), rather then index range scan on index on (A)
if we add a field that is not in the index at all to the select list e.i. D than we get correct behaviour
  table access by index rowid

        index range scan on index on (A)

we created an almost empty table with the same structure and indexes and it works OK

We have rule opctimizer on 7.3.3.6 on unix DC/OSx Nile Pyramid

How can we fix this and what is the reason?

Sincerely yours, Konstantin Kivi <kivi_at_hotmail.ru>

Received on Fri May 18 2001 - 03:24:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US