Re: order by question
Date: Fri, 24 Oct 2008 01:56:16 -0700 (PDT)
Message-ID: <4a5ae121-4998-479d-a14e-1ff87418e092@m74g2000hsh.googlegroups.com>
On 23 Okt, 17:34, sybra..._at_hccnet.nl wrote:
> On Thu, 23 Oct 2008 07:34:51 -0700 (PDT), sbr..._at_yahoo.com wrote:
> >I have not been able to get a resultset which is unsorted acording to
> >x.z but need to know that this would not happen in a productive
> >environment.
>
> By definition all SQL prodiuces a set. The set is always an
> *unordered* collection *by design*, because that is mathematical
> theory.
> Ergo: Oracle does NOT guarantee any resultset is according to any
> order, when there is no order by clause in the top level of the query.
> It would be very silly to 'rely' on a specific ordering, and raises
> suspicions your 'productive environment' is not so productive, as it
> is processing a set as a bunch of records.
> Which it shouldn't as that wouldn't scale.
>
> --
> Sybrand Bakker
> Senior Oracle DBA
If you dont have anything valuable to add then dont. Do you actually have an example of when the resultset is not ordered because I have not been able to produce it. If yes then please say so. That would be valuable information for me. I already know that "Oracle does NOT guarantee any resultset is according to any order, when there is no order by clause in the top level of the query". That is pretty much basic stuff and this information is not valuable to me. And yes the system is productive. The select is in a function which returns a sys_refcursor to a java application. The select is based on tables where several of them contains more than 10 million records and is working well thus far. I do not see why it would not be scalable.
Slavko Received on Fri Oct 24 2008 - 03:56:16 CDT