RE: HASH GROUP BY

Yes, I have to be honest....
I too was bit by this one in my code.
It would not be fair of me to be judgmental.


Pat



________________________________
From: Jared Still [mailto:jkstill@xxxxxxxxx]
Sent: Wednesday, April 23, 2008 3:52 PM
To: Elliott, Patrick
Cc: Rob.Dempsey@xxxxxxxxxx; oracle-l@xxxxxxxxxxxxx
Subject: Re: HASH GROUP BY

Ah, ok.  Didn't get that from your post.

Many people have relied on this 'feature' in the past, only to see it 'break'
with a new version.

On Wed, Apr 23, 2008 at 1:40 PM, Elliott, Patrick 
<patrick.elliott@xxxxxxxxxxxxx<mailto:patrick.elliott@xxxxxxxxxxxxx>> wrote:
That is correct.  My point is that what Rob is calling wrong results is 
actually just unexpected results based on invalid assumptions.


Pat



________________________________
From: Jared Still [mailto:jkstill@xxxxxxxxx<mailto:jkstill@xxxxxxxxx>]
Sent: Wednesday, April 23, 2008 3:34 PM
To: Elliott, Patrick
Cc: Rob.Dempsey@xxxxxxxxxx<mailto:Rob.Dempsey@xxxxxxxxxx>; 
oracle-l@xxxxxxxxxxxxx<mailto:oracle-l@xxxxxxxxxxxxx>
Subject: Re: HASH GROUP BY

On Wed, Apr 23, 2008 at 12:20 PM, Elliott, Patrick 
<patrick.elliott@xxxxxxxxxxxxx<mailto: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

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is 
proprietary to Medtronic and is intended for use only by the individual or 
entity to which it is addressed, and may contain information that is private, 
privileged, confidential or exempt from disclosure under applicable law. If you 
are not the intended recipient or it appears that this mail has been forwarded 
to you without proper authority, you are notified that any use or dissemination 
of this information in any manner is strictly prohibited. In such cases, please 
delete this mail from your records. To view this notice in other languages you 
can either select the following link or manually copy and paste the link into 
the address bar of a web browser: http://emaildisclaimer.medtronic.com



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

Other related posts: