When you optimize a simple SQL statement, Quest SQL Optimizer may only generate a few SQL alternatives using the default settings in the Optimizer options. It is very likely that many more alternatives can be generated, but they did not get generated because of the way the options were set. This tip covers how to generate more SQL alternatives.
The options settings in Quest SQL Optimizer for Oracle enable you to select which Oracle optimization hints are applied, include or exclude a few of the syntax transformation rules that are used, select how many driving paths will be tried, and increase or decrease the number of SQL alternatives generated. We’ll take a look at how you can do this using the Optimizer options. These options apply to the optimization process in both the Tuning Lab and the Batch Optimizer.
- To open the Options window, click Options .
- Select Tuning Lab | Optimizer | Intelligence.
By default, the “intelligence level” of the optimization process is set to Predefined Settings with level 4. Change the intelligence level to 10.
Level 10 selects all of the Optimization options, all of the Oracle optimization hints, and sets the quotas for the maximum number of SQL statements that will be generated very high.
Applying Level 10 to your original SQL statement maximizes the possibility of finding a better alternative for you.