What If? testing from the Query Limits report
To perform What If? testing for a particular SQL statement, issue the W line command from the Query Limits report.
About this task
Note:
- If any modifications were made using virtual indexes, those changes will remain in effect when the What If? processing is completed. To reverse the effected changes, an extra iteration of What If? processing can be used to reverse the virtual index changes, or virtual index changes can be made by navigating to option 2.3 from the main menu.
- The What If? reports will be deleted when the What If? processing is completed. To keep the What If? reports, rename the desired reports before exiting the What If? processing.
Procedure
- Select the desired query with the W line command. Press Enter.
- The What If? Modifications panel will be displayed. Enter Y in the Create or drop index field to make virtual index changes, or enter N if no virtual index changes are desired. Enter Y in the Modify SQL statement field to modify the query, or enter N to skip the query modification. Press Enter.
- If Y was entered in the Create or drop index field, the Create index panel will be displayed. See Creating and dropping indexes for more information about using virtual indexes. Press PF3 to exit the panel and continue processing. Note: Only virtual index changes are allowed during What If? processing.
- If Y was entered in the Modify SQL statement field, the query will be displayed in an edit session. The original query will be retained at the top in comments as a reference. Modify the query as desired and press PF3 to exit and continue processing.
- The original explain results will be displayed in the Query Limits report with "base" as the value in the Error column. The What If? results will be displayed with 100000001 as the value in the Query No column. To view the new results, select the What If? results with one of the line commands.
- To continue What If? processing, use the WIF panel command to begin another iteration. For each subsequent iteration, the Query No value will be incremented by 1.
- To save the What If? reports, rename the reports before exiting the What If? Query Limits Report panel.
- To exit What If? processing, press PF3 from the What If? Query Limits Report panel.