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 -> Re: Query not using indexes

Re: Query not using indexes

From: Christian Antognini <christian.antognini_at_trivadis.com>
Date: Thu, 8 Jul 2004 23:28:55 +0200
Message-ID: <40edbc97$1@post.usenet.com>

Hi

> A query of mine in Oracle 9i R2 chooses to perform a full table scan of 1
> million row instead of using the index.
> I'm using CBO and just computed the statistics for the table.

If you don't provide more information... it's only possible to guess what's going on... and guessing it is not the way you should approach a performance problem!

If I had such a problem I'll just compare the execution plans with and without hint (to force the index range scan). Very important are the costs and cardinalities computed by the CBO. In addition I'll give a look to some simple statistics about the column used in the predicate, e.g. for a column named ID and a table named PERSONS:

select count(id), count(unique id), min(id), max(id), avg(id) from persons; select count(cnt), count(unique cnt), min(cnt), max(cnt), avg(cnt) from (select count(*) cnt from persons group by id);

Chris

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Received on Thu Jul 08 2004 - 16:28:55 CDT

Original text of this message

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