Re: HASH GROUP BY

  • From: "Jared Still" <jkstill@xxxxxxxxx>
  • To: patrick.elliott@xxxxxxxxxxxxx
  • Date: Wed, 23 Apr 2008 13:34:07 -0700

On Wed, Apr 23, 2008 at 12:20 PM, Elliott, Patrick <
patrick.elliott@xxxxxxxxxxxxx> wrote:

>  Now I understand what you mean by buggy.  It no longer sorts the rows.
> If you have code that relies on a group by being in sorted order, then the
> code will no longer work.  If you have had to disable this in the past to
> get correct results, then you will need to continue disabling it
> indefinitely.  The only way to fix it and reenable the hashing group by is
> to change the code.
>
>

GROUP BY has never been documented to provide rows in sorted order.

From the docs:

The GROUP BY clause groups rows but does not guarantee the order of the
> result set. To order the groupings, use the ORDER BY clause.
>


-- 
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

Other related posts: