From: Allen Kirby <akirby@att.com>
Subject: Re: Why does sqlplus "select" produce different order of data?
Date: 1997/12/04
Message-ID: <3486B927.2037@att.com>#1/1
References: <66556k$n4r$0@204.179.92.69>
To: David Shi <dshi@magpage.com>
Organization: AT&T - ITS Production Services
Reply-To: akirby@att.com
Newsgroups: comp.databases.oracle.server



David Shi wrote:
> 
> (please also forward your message to dshi@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.


