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: Why does sqlplus "select" produce different order of data?

Re: Why does sqlplus "select" produce different order of data?

From: Allen Kirby <akirby_at_att.com>
Date: 1997/12/04
Message-ID: <3486B927.2037@att.com>#1/1

David Shi wrote:
>
> (please also forward your message to dshi_at_magpage.com, thanks a lot)
>
> Sorry about posting several questions at the same time, sometimes it's
> so difficult to get help from Oracle technical support.
>
> I noticed when I do a select, each time I got different order of data,
> is this a Unix buffer problem or something else?
>
> Oracle version 7.3.3, OS: Solaris 2.5.1 on a SUN 4000.
>

<snip>

Working as designed. Relational databases do not guarantee the order of rows returned from a query unless the order by clause is explicitly used. Now, I would have expected the rows to be in the same order, especially with a small table, but they don't have to be. Are you using the parallel query option? This could change the order. I'm sure it's some kind of internal oracle algorithm intended to improve performance. I don't think it would be related to any operating system buffering. Just remember if you want it to be ordered, use order by explicitly.

-- 
Allen Kirby			
AT&T Information Technology Services
Alpharetta, GA.
The views expressed here are mine, not my employers.
Received on Thu Dec 04 1997 - 00:00:00 CST

Original text of this message

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