Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







Oracle PGA sort hash _smm_max_size

Oracle Tips by Burleson Consulting
February 6, 2004

When Oracle replaced the sort_area_size and hash_area_size functionality with the  pga_aggregate_target parameter in Oracle, there was a great deal of speculation about how to control sorting and hash joins within the large PGA region.  Here we discuss two issues.  How do we increase the RAM for hash joins and RAM sorting within the pga_aggregate_target?

For example, we might have a single evening batch task that would benefit from using all of the pga_aggregate_target, not just the 5% limit.

Increasing Hash Joins

To force hash joins you must perform two steps.  It may not be enough to increase the hash_area_size if the CBO is stubborn, and usually you must force the hash join with a hint.

Step 1 - Increase the hash_area_size maximum

alter session set workarea_size_policy=manual;
alter session set hash_area_size=1048576000;

Step 2 - Add a use_hash hint to the SQL

select /*+ use_hash(a, b)*/
from . . .

Increasing RAM sorting

In Oracle, the sorting default is that no single task may consume more than 5% of the pga_aggregate_target region before the sort pages-out to the TEMP tablespace for a disk sort.  For parallel sorts, the limit is 30% of the PGA aggregate, regardless of the number of parallel processes.

You can override the default sorting behavior in two ways:

Option 1 - Manual override:

alter session set workarea_size_policy=manual;
alter session set sort_area_size=1048576000;

Option 2 - Bounce with special hidden parameter:  In this example, we increase the default amount of RAM available to sort operations from 5% to about 50%:


Not that the number for _smm_max_size is expressed in k-bytes, so this value is about 4.5 gigabytes.

Remember, hidden parameters are totally unsupported, so use this technique at your own risk.

If you like Oracle tuning, see my latest book "Oracle Tuning: The Definitive Reference". 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts: 




Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.