Click the SQL button on the Overview tab to specify the source of SQL statements you want to tune.
SQL statements to the SQL Text dialog or write queries by hand and then click OK.
You can also input SQL by clicking anywhere in the Tuning Statements area and pressing Ctrl-V. |
Once you have input the SQL and click OK, you can later edit the text by right-clicking an entry in the Tuning Statements area and selecting Edit.
Once you click the Run Job icon on the top right-hand side of the Overview tab, the Overview tab provides the list of statements that were analyzed by the Tuner, as well as the cases suggested by the execution process to improve them. Additional information may include statement Name, Text, Source, Cost, and Elapsed Time values, depending on the platform.
Only the Elapsed Time statistic appears on all supported platforms. On Oracle and DB2 LUW platforms, Execution Statistics and Other Execution Statistics columns will appear. When determining the best possible path using the Overview tab, it is best to use the Elapsed Time value as the guideline. The faster the path, the more optimized the query will become.
There are three tuning options to choose from before clicking Run Job:
To analyze the SQL statement, click Generate cases.
To perform the analysis that populates the Analysis tab now, click Perform detail analysis. Otherwise, the analysis tab is populated when you click the Analysis tab.
To have the system generate execution statistics, click Execute each generate case and then select the number of time the system should execute each generated case. Multiple executions can verify that the case results are not skewed by caching. For example, the first time a query is run, data might be read off of disk, which is slow, and the second time the data might be in cache and run faster. Thus, one case might seem faster than another but it could be just benefiting from the effects of caching. Generally, you only need to execute the cases once, but it may be beneficial to execute the cases multiple times to see if the response times and statistics stay the same.
After tuning SQL you can create an HTML or PDF Report of the tuning session. You can choose the details to include in the report.
| | | | | | | |