• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Oracle HASH GROUP BY & SORT GROUP BY performance

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic