Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: GROUP BY & implicit sorts

Re: GROUP BY & implicit sorts

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 24 Jul 2002 09:29:39 +0100
Message-ID: <1027499302.17024.0.nnrp-08.9e984b29@news.demon.co.uk>

Just live in hope that no-one decides to speed up your applications by switching
on parallel queries !

Also, Oracle could do a:

    sort (group by) nosort
by using an index to acquire the data,
but if a driving condition were:

    where X <= {const}
then, in principle, Oracle could use the index in descending order, and leave
your output sorted the wrong way round.

--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminars
 UK  Sept
 Australia August
 Malaysia September
 USA x 2  November

http://www.jlcomp.demon.co.uk/seminar.html

Charlie Edwards wrote in message ...

>This is just an academic question.
>
>Recently I read somewhere that Oracle does not guarantee that a GROUP
>BY will always sort the result set (as if you did an ORDER BY).
>
>Now I always assumed that this was the case (probably just because in
>my experience this always seemed to happen).
>
>Is Oracle just covering itself here? Along the lines of "we never
>actually promised that GROUP BY will do a sort, so if we find a better
>way of grouping without sorting, don't blame us".
>
>Has anyone ever had experience of a GROUP BY that didn't sort as
>expected?
>
>I've left code with a GROUP BY but no ORDER BY in applications the
>length and breadth of England - hope my name isn't at the top ;-)
>
>CE
Received on Wed Jul 24 2002 - 03:29:39 CDT

Original text of this message

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