RE: HASH GROUP BY

From: Elliott, Patrick <patrick.elliott_at_medtronic.com>
Date: Wed, 23 Apr 2008 15:55:05 -0500
Message-ID: <3B8B6A1700202C43A89D61CE495C894E0F02EB425B@MSPM1BMSGM103.ent.core.medtronic.com>


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_at_gmail.com] Sent: Wednesday, April 23, 2008 3:52 PM
To: Elliott, Patrick
Cc: Rob.Dempsey_at_5one.co.uk; oracle-l_at_freelists.org 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_at_medtronic.com<mailto:patrick.elliott_at_medtronic.com>> 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_at_gmail.com<mailto:jkstill_at_gmail.com>] Sent: Wednesday, April 23, 2008 3:34 PM
To: Elliott, Patrick
Cc: Rob.Dempsey_at_5one.co.uk<mailto:Rob.Dempsey_at_5one.co.uk>; oracle-l_at_freelists.org<mailto:oracle-l_at_freelists.org> Subject: Re: HASH GROUP BY

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

--

http://www.freelists.org/webpage/oracle-l Received on Wed Apr 23 2008 - 15:55:05 CDT

Original text of this message