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 


 

 

 


 

 

 
 

push_subq hint tips

Oracle Database Tips by Donald BurlesonApril 2, 2015

Question: I have been reading about the push_subq hint.  I am currently on an older version of Oracle but am interested in upgrading but I want to get my system tuned first.  How can the push_subq hint help me with tuning my Oracle subqueries?  Where do I put the push_subq hint to make it most effective?  Finally, Is it true that push_subq will behave differently after my upgrade? and where do I use push_subq to tune Oracle subqueries?

Answer: I'm going to make the assumption that your current system is older than Oracle 10g and that your upgrade will be to 10g or higher.

In general, subqueries that are not merged into the outer query are sometimes executed as the last step in the execution plan. The push_subq hint is used to force all subqueries in the query block to be executed at the earliest possible place in the execution plan.  With push_subq, the subqueries are often executed before the outer query is executed.

 You also could use the with clause and the materialize hint, along with the precompute_subquery hint that perform functionality similar to that of the push_subq hint.

If the subquery is relatively inexpensive and reduces the number of rows significantly, then use of push_subq can improve the overall performance by evaluating the subquery as soon as possible.

Note that the push_subq hint has no effect if the subquery is using a sort merge join, or when the subquery references a remote table.

Additionally, Oracle suggests the use of push_subq when there are lots of non-indexed predicates where the majority of them come out TRUE and there is non-merged subquery that significantly reduces the number of rows.  The benefit of this application of push_subq is likely to only be with large data volumes that would like benefit from merging the subquery using UNNEST.

When you upgrade to Oracle 10g and beyond, you will find that push_subq is much more flexible.  With multiple subqueries, push_subq can be used to run individual subqueries at specific points earlier or later in the process:

  • The push_subq hint can be moved into any subquery to be pushed

  • The push_subq hint can be combined with the new qb_name() hint in order to name a specific subquery so it can be referenced by name. This use of push_subq allows the naming and pushing of any number of subqueries.

The syntax for the push_subq hint is:

/*+ push_subq [ ( @ qb_name) ] */

Conversely, the no_push_subq hint can be used to force non-merged queries to be evauated as the last step of the execution plan.

 


 





 

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.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster