RE: HASH GROUP BY

From: Pratap Singh (c) <psingh_at_vmware.com>
Date: Wed, 23 Apr 2008 14:10:43 -0700
Message-ID: <C388F0160F8F6A4DA25614D019619C8F288912@PA-EXCH21.vmware.com>


hash group by also has some bug. On 10.2.0.2 we hit one. In our case query was not returning any result. Changing query path or setting group hash by - false worked, returning proper result.
Thanks  



PB Singh
DW Architect and Sr Data Modeler
VMware    

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Elliott, Patrick
Sent: Wednesday, April 23, 2008 1:55 PM
To: Jared Still
Cc: Rob.Dempsey_at_5one.co.uk; oracle-l_at_freelists.org Subject: 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_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> 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] 
	Sent: Wednesday, April 23, 2008 3:34 PM
	To: Elliott, Patrick
	Cc: Rob.Dempsey_at_5one.co.uk; 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> 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 - 16:10:43 CDT

Original text of this message