Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Index usage ??
Ralf wrote:
>
> I have the following statement:
>
> select max(value1) from table1
>
> There is an index "index1 on table1(value1)".
>
> The plan for the above statement shows me that the database uses an
> full index scan and an table access by rowid to retrieve the value.
> Why does it behave like this ?
>
> I tought the index should be sorted ? Then i would navigate at the end
> of the index, get the value. I wouldn´t do any full index scan and
> would not go to the table to get the value, because its in the index
> already.
>
> Can someone explain, please ?
>
> Ralf
version?
later versions of oracle will/can/may show a 'INDEX (MIN/MAX)' in the explain plan which does exactly what you were anticipating.
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Wed Feb 06 2002 - 17:05:42 CST
![]() |
![]() |