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: Index usage ??

Re: Index usage ??

From: Jaap W. van Dijk <j.w.vandijk_at_hetnet.nl>
Date: Sat, 09 Feb 2002 11:17:14 GMT
Message-ID: <3c6504da.1078169@news.freeler.nl>


I can't explain, but you can force what you want:

select /*+ index_desc (table1 index1) */ value1 from table1
where rownum = 1

Jaap.

On 6 Feb 2002 13:36:21 -0800, hexenloewe_at_gmx.de (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
Received on Sat Feb 09 2002 - 05:17:14 CST

Original text of this message

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