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: sort without order by

Re: sort without order by

From: Steve McDaniels <steve.mcdaniels_at_sierra.com>
Date: Wed, 17 Nov 1999 14:32:34 -0800
Message-ID: <80vaf6$ksm$1@plo.sierra.com>


I seem to remember reading about a trick using a HINT where the desired effect of

select * from a_table where an_indexed_field is not null

would run faster if one uses

select /*+ INDEX a_table(an_indexed_field) */ from a_table;

in that row references to records which contain "null" in the indexed field are never stored.

Anybody hear/see/experience this?

Thomas Kyte <tkyte_at_us.oracle.com> wrote in message news:460yOJef1dyg75sckSORZy62zl0e_at_4ax.com...
> A copy of this was sent to Norris <jcheong_at_cooper.com.hk>
> (if that email address didn't require changing)
> On 17 Nov 1999 05:34:20 GMT, you wrote:
>
> >In SQLServer, I can select data from table without order-by and the
records are sorted according to the clustered index of the table. What is the syntax in oracle?
>
>
> you would use an index organized table. A full scan of an index organized
table
> returns the data in the order of the primary key. These are available in
> Oracle8.0 and up.
>
> --
> See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to
Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated June
21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle
Corporation Received on Wed Nov 17 1999 - 16:32:34 CST

Original text of this message

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