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 hint

Re: +Sort hint

From: Doug Cowles <dcowles_at_bigfoot.com>
Date: Wed, 07 Jul 1999 21:04:29 -0400
Message-ID: <3783F91C.BC010C70@bigfoot.com>


Got the idea..but I thought no matter what order you put data in, it wouldn't neccessarily come out that way. Does this mean that it is actually stored in the order it is inserted, but not necessarily extracted the same way? I've heard a couple of times when people want the first 10 rows of a table with rownum for example, that the first 10 rows could vary from day to day...

Thanks,
Dc..

Nuno Souto wrote:

> Pre-sorting can be interesting to performance.
>
> Say you have a column(s) that has a non-unique index on it.
>
> If you pre-sort on the column(s), all the rows of that same
> index key value will most likely be in the same block. One
> single read operation gets them all. As opposed to storing
> the rows in any other order and trying to retrieve by this
> same index, which can cause "hidden" multiple reads.
>
> Kind of a poor-man's clustering, really.
>
> You can do the same with ORACLE clustering on a single table,
> instead of the "textbook" clustering of two tables.
>
> --
> Cheers
> Nuno Souto
> nsouto_at_nsw.bigpond.net.au.nospam
> Is there a nospam domain?
> http://www.users.bigpond.net.au/the_Den
> Doug Cowles <dcowles_at_bigfoot.com> wrote in message
> news:37814D8C.D6BF65EF_at_bigfoot.com...
> > I was using an automated tuning tool that recommended I place the data
> > into the
> > table in sorted order, and then user a +Sort hint to expedite a query.
> >
> > I thought that Oracle pretty much returned the data any way it felt like
> > it regardless
> > of when I put it in. What good will pre-sorting data do?
> >
Received on Wed Jul 07 1999 - 20:04:29 CDT

Original text of this message

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