Generating a tuned statement


After evaluating the effects of What-If indexes on statement performance, you can generate the SQL statements required to create indexes, drop indexes, and update index statistics.

Before you begin

The What-If index feature is available only if you have a valid license for the BMC AMI SQL Performance for Db2 solution.

To generate a tuned statement

  1. Create a What-If scenario. For more information, see Creating and editing a What-If index scenario.
  2. Make changes as needed to the indexes:
  3. Explain the What-If scenario. For more information, see Explaining SQL statements.
  4. (Optional) To export the explain plan to a PDF file, perform the following steps:
    1. Click Generate Report NW_file_text_o.png .
      Based on your browser settings, after Command Center generates the report, either the Save As dialog box is displayed or the browser saves the file automatically.
    2. Enter a name for the file.
    3. Click Save.
  5. Click Generate. The Generated Statements pane displays the statement required to make the index changes.
  6. Click Save.
  7. Save the file to the required data set. For more information, see Editing text files in Scratchpad.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*