Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query not using indexes
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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=