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

 
 Home
 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
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

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

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle join types: nested loops

Oracle Tips by Burleson Consulting

Some queries will perform faster with NESTED LOOP joins, some with HASH joins, while others favor sort-merge joins.  It is difficult to predict what join technique will be fastest a priori, so many Oracle tuning experts will test-run the SQL with each different table join method and time the speed with the SQL*Plus "set timing on" command.

These goals may seem deceptively simple, but these tasks comprise 90 percent of SQL tuning, and they do not require a thorough understanding of the internals of Oracle SQL. Let's begin with an overview of the Oracle SQL optimizers.

Of course, you can tune the SQL all you want, but if you do not feed the optimizer with the correct statistics, the optimizer may not make the correct decisions.  It is important to ensure that you have statistics present and that they are current. 

Some believe in the practice of running statistics by schedule such as weekly, some believe in just calculating statistics when the data changes, still others believe that you only run statistics to fix a poor access path, and once things are good; do not touch them.  It is difficult to say who is correct. 

Therefore, the new features in Oracle 10g that tell you when statistics are old and need to be recalculated are extremely helpful. Gone are the days when statistics were calculated weekly (or on whatever schedule), just in case the data changed.  Now we know for sure one way or the other.  Of course, some will still believe that you should only calculate new statistics if you are having a problem, and once you have decent access paths, leave it alone.

For complete scripts to access Oracle joins, see Mike Ault's script collection:

Advanced Oracle Monitoring and Tuning Scripts

Also, see these good notes on nested loop vs. hash joins:

 



 

 

��  
 
 
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.