Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Query sorting without Order by
which of course may not be unreasonable. 100 names might well fit into a single oracle block. the index scan would require two block reads. which is more efficient? the FTS.
-- Niall Litchfield Oracle DBA Audit Commission UK "A.M.Andreyev" <ama_at_uaz.ru> wrote in message news:95uqq5$q1$1_at_core.uaz.ru...Received on Mon Feb 12 2001 - 08:57:30 CST
> 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...
> > 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/
>
>
![]() |
![]() |