Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Query sorting without Order by

Re: Query sorting without Order by

From: <jdorlon_at_my-deja.com>
Date: Tue, 06 Feb 2001 17:33:16 GMT
Message-ID: <95pcgs$edq$1@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/ Received on Tue Feb 06 2001 - 11:33:16 CST

Original text of this message

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