Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Query sorting without Order by
A hint is a hint, it is not an order. I
tried the trick on a small table (~100
human names),
and the explain plan showed, that no
index was ever used at all, so no
sorting was seen.
-- A.M. Andreyev, ORACLE DBA <jdorlon_at_my-deja.com> wrote in message news:95pcgs$edq$1_at_nnrp1.deja.com...Received on Thu Feb 08 2001 - 13:07:24 CST
> Yes, but when a comment is in the
right place with the right format,
> They are optimizer hints. They tell
Oracle how to execute the
> query (rather than decide for itself).
The hint below tells oracle to
> use the index MY_TABLE_X. When oracle
uses the index, the rows will
> come back in the order of the index.
That's how we can sort the rows
> without a sort!
>
>
> > >
> > > select /*+ INDEX (MY_TABLE_X,
MY_TABLE) */ *
> > > from MY_TABLE
> > >
> > From where do you have that? /* and
*/ are reserved for remarks.
> >
> > Regards
> > Nicolas
>
>
> Sent via Deja.com
> http://www.deja.com/
![]() |
![]() |