It's not a secret anymore!
The moose likes Oracle/OAS and the fly likes Oracle HASH GROUP BY & SORT GROUP BY performance Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply Bookmark "Oracle HASH GROUP BY & SORT GROUP BY performance" Watch "Oracle HASH GROUP BY & SORT GROUP BY performance" New topic
Author

Oracle HASH GROUP BY & SORT GROUP BY performance

Ratan Kumar
Ranch Hand

Joined: Jul 19, 2006
Posts: 67
Hi,

I have a select query which uses GROUP BY and HAVING clause performing selct over 3 million records.

In oracle 10g one version (i think rel 2), the explain plan shows HASH GROUP BY and this query runs very fast.

In oracle 10g another version (i think rel 1), the explain plan shows SORT GROUP BY and this query takes hours.

Pls suggest what should i do? Is there any hint that can make the query use HASH GROUP BY instead of SORT GROUP BY.
Or is there any other option that i should try?

Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle HASH GROUP BY & SORT GROUP BY performance
 
Similar Threads
user groups for oracle database
Need help - Lot of joins are slowing down my query
Regarding Exam 1Z0-001(OCP)
Query Estimation
pre-compile and prepared statement