Performance improvement can be obtained by running the SQL Rewrite function on an SQL statement. This function transforms the SQL syntax into equivalent statements with different access plans.
Use the following procedure to send the selected SQL statement to the SQL Optimizer window, where the SQL Rewrite function is automatically run on the statement.
To send a SQL statement to the SQL Rewrite function from another module
Select the single SQL statement you want to optimize.
Click . The selected SQL statement is copied to the SQL Optimizer window, and the rewrite process is automatically started.
When you copy a SQL statement from the Scanned SQL Viewer, the following can occur:
If the SQL statement uses temporary tables and the DDL for creating the table was found when scanning, you are prompted to create the temporary tables through the User-Defined Temp Table window.
If the DB2 LUW Special Registers are different from current settings, you are prompted to set the special registers through the Special Register Settings window.
If your current schema does not match the one previously used to retrieve the access plan of the SQL statement, a message alerts you to change the schema from the box at the left-corner of the main window.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center