Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why is optimizer choosing this index?
> where a= ...., date between .... and .... and not
> (b like ....) and (c = ... or c = ... or c = ...)
>
The 'between', 'like' and 'or' clauses either discourage or prevent (not
sure) the optimizer from using the index.
>
> Is this performing a bounded range search on the
> indexed columns, even though only there are indexed
> columns between the leading column and the range?
> It would be expected that it would perform slowly,
> filtering on only one column. But it is very fast.
> Plus, the cost based optimizer chooses a different
> path,(Full Scan) and is much slower.
>
I would guess that you haven't used 'analyze' on the table if cost based
chooses a full table scan. Unless column 'a' has very low cardinality (say
less than 20 values) but then the difference in speed wouldn't be that
great.
Received on Wed Jul 01 1998 - 21:51:44 CDT
![]() |
![]() |