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: indexing a "path"

Re: indexing a "path"

From: Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl>
Date: Sat, 16 Mar 2002 16:08:00 GMT
Message-ID: <3c936ab6.582833@news.freeler.nl>


Assuming you did analyze the table and its index: Oracle determines or estimates how many values a column has and assumes that every value has the same number of rows. On this assumption it determines which access path will be the fastest.
If the values in your where clause are much rarer than the average, the optimizer will make the wrong decision. You can inform the optimizer of the skewness of your values by collecting histogram statistics for the column.

Apart from this, in my experience the optimizer has a tendency to prefer a full table scan over a index scan too soon.

Jaap.

On Sat, 16 Mar 2002 13:16:18 +0100, "Steffen Ramlow" <s.ramlow_at_gmx.de> wrote:

>
>
>"Jaap W. van Dijk" <j.w.vandijk.removethis_at_hetnet.nl> wrote in message
>news:3c932c5a.1583807_at_news.freeler.nl...
>> What happened when you forced Oracle to use the index? Did it go
>> slower? If it did, the optimizer made the right decision not to use
>> the index.
>
>no, when i set the optimizer to rule it is very fast
>
>
Received on Sat Mar 16 2002 - 10:08:00 CST

Original text of this message

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