You can test a single SQL or index-set alternative to find out how it will perform under different amounts of data in your database in Quest's Benchmark Factory program (version 4.6 or later).
To send SQL statement to Benchmark Factory
Click to optimize the original SQL statement. The rewritten SQL versions display as alternatives in the Run Time pane..
Click Test for Scalability .
All the SQL statements can be saved in a text file from the Job Manager, the Scanned SQL Viewer, the SQL Repository, and the SQL Optimizer windows. These SQL statements can then be imported into Benchmark Factory program (version 4.6 or later).
To create the text file to import into Benchmark Factory
Right-click and select Create Benchmark Factory Import File.
Select the specific SQL statements that you want to save. Click OK.
Enter the filename and select the file location. Click Save.
Quest SQL Optimizer for IBM® DB2® LUW maximizes SQL performance by automating the manual, time-intensive and uncertain process of ensuring that SQL statements are performing as fast as possible. SQL Optimizer analyzes, rewrites, and evaluates SQL statements within multiple database objects, files. With SQL Optimizer, you can analyze and optimize all your problem SQL from multiple sources. SQL Optimizer also provides you a complete index optimization and plan change analysis solution, from index recommendations to simulated index impact analysis, through comparison of multiple SQL access plans.
SQL Optimizer provides you with the following main modules.
SQL Optimizer (including SQL Rewrite and Generate Indexes functions)
The Batch Run function is used to retrieve run times for a group of index-set and SQL alternatives. You can then evaluate run-time results to determine the best performing alternative.
To setup and start the Batch Run
Click .
The Batch Run Criteria window is divided into the following tabs:
Select the batch run criteria.
The settings can be saved for next optimization by selecting the Save settings for next batch run checkbox. By default, this checkbox is unselected.
The Batch Run window displays the run-time criteria and posts the run time for each alternative as it is retrieved. Stop Current and Stop Batch Run functions are available to terminate the currently running alternative and to stop the Batch Run process. Each selected SQL statement is executed one by one, retrieving the run time unless it is terminated.
To terminate the complete batch run process
Click .
To terminate the current SQL statement
Select SQL | Stop Current.
When you log on to SQL Optimizer, it extracts the logical structure of the database, and maintains this connection throughout the application execution. Another database session is required for when executing the SQL statements for retrieve the run time. This connection is established when the Run for First Record, Run for All Records, or Batch Run functions are initiated and then this new session is dropped after the execution is complete.