Hello, you are not logged in.  Login or sign up
Toad on Twitter Follow Toad Search Toad World Search
Blogger List   

All Recent Blog Entries
 

Johannes Ahrends
Unicode and Toad

Ben Boise
Toad SC Discussions

Kevin Dalton
Benchmark Factory

Steven Feuerstein
PL/SQL Obsession

Devin Gallagher
Toad SC discussions

Stuart Hodgins
JProbe Discussions

  Henrik "Mauritz" Johnson
Toad Tips & Tricks on the "other" Toads
  Mark Kurtz
Toad SC discussions
  Michael Lumbard
Toad SC discussions
Daniel Norwood
Toad for Data Analysts,
Toad Extension for Visual Studio
Debbie Peabody
Toad for Data Analysts
Gary Piper
Toad Reports Manager
John Pocknell
Toad for Oracle, JProbe
Kuljit Sangha
Toad SC discussions
Bert Scalzo Indicates Oracle ACE status
Toad for Oracle, Data Modeling, Benchmarking
Jeff Smith
Toad product family
Richard To
SQL Optimization
Jim Wankowski
DB2 - LUW and z/OS
John Weathington
  Toad World Editor
Toad World issues

  Toad Data Modeler Opens in a new window
Data Modeling
 
  Real Automated Code Testing for Oracle
Quest Code Tester blog

Blogs
Toad and Database Commentaries

Toad World blogs are a mix of insightful how-tos from Quest experts as well as their commentary on experiences with new database technologies.  Have some views of your own to share?  Post your comments!  Note:  Comments are restricted to registered Toad World users.

Do you have a topic that you'd like discussed?  We'd love to hear from you.  Send us your idea for a blog topic.

SQL Optimizer Part 10 – How to Optimize without Oracle Hints
 
Location: Blogs Richard To's Blog    
 RichardTo Monday, April 13, 2009 2:18 AM

Written by Rene Woody
 
This blog is a continuation of a series about the SQL optimization process in the Batch Optimizer and the Tuning Lab modules of Quest SQL Optimizer for Oracle.  It explains how to generate SQL alternatives that do not have Oracle optimization hints.

Oracle provides optimization hints that can be added to the syntax of a SQL statements to attempt to influence the execution plan that the database optimizer will use to execute the SQL statement. Quest SQL Optimizer for Oracle uses this technique in its optimization process to generate more unique execution plans for your original SQL statement. For more information on how the SQL alternatives are generated, see this previous blog: Optimizing SQL Part 1 – The Optimization Process.

To learn more about how the hints are applied by Quest SQL Optimizer see this previous blog: Optimizing SQL Part 6 – Using Oracle Optimization Hints when tuning SQL

Basically, using Oracle hints to tune SQL is an acceptable method that makes your SQL statements to be more stable in the production database. Some people may argue that using hints should be the last resort or even be forbidden for tuning SQL, since hints will limit the flexibility of the Oracle SQL optimizer to handle future data changes or adapt to new optimizer enhancements. But the point is that for a problematic SQL statement that Oracle cannot handle well today, why not fix it today with the best execution plan even if it uses a hint instead of holding to the expectation that the Oracle optimizer may automatically solve it in future. What this means is that you are sacrificing the current performance for the unforeseeable future improvement or maybe even a further performance degradation.

If you do not want any of the Oracle hints applied to the SQL alternatives that are generated for your original SQL statement, you can use an option setting to turn off this feature. 

  1. Click .
  2. Select Tuning Lab | Optimizer | Intelligence.
  3. Select Predefined Settings.
  4. In the list, select Do not use Oracle optimization hints.
 
If you would like to learn more about Quest SQL Optimizer for Oracle, please visit the Inside SQL Optimizer for Oracle community.
Permalink |  Trackback
Search Blog Entries
 
Copyright 2010 by Quest Software  | Terms Of Use | Privacy Statement | Contact Us