Creating and editing a What-If index scenario


Use the following procedure to evaluate how adding an index, dropping an index, or updating index statistics would affect a statement's performance.

Related topics

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 create a What-If index

  1. In the Performance perspective, select the source statement. You can use a baseline statement or a previously created What-If scenario.

    The SQL tab displays the details of the source SQL statement.

  2. If the selected statement has not been explained, click Generate explain plan NW_generate_explain.png to Explain it.
  3. Click NW_create_what_if.png.
  4. (Optional) Enter a unique name for the new scenario.

    Important

    If you do not enter a name, the scenario uses the source statement's name with an incremental number added as a suffix.

  5. Click the Indexes tab.

    Important

    For more information, see Indexes tab. The Indexes tab is available only if the baseline statement was successfully explained.

    The Indexes tab includes these items:

    • Command buttons enable you to add, drop, edit, or copy indexes from the What-If statements.
    • The Tables pane lists the tables referenced in the SQL statement.
    • The Indexes pane lists the indexes of the selected table (initially, the top entry in the list).

      Important

      g_gud_Check_16.png identifies indexes that the Explain plan uses.

  6. From the Tables pane, select the table that contains the index that you want to edit.
  7.  From the Indexes pane, select the index. Perform any of the following actions to set up the scenario that you want to evaluate:

    Important

    You cannot make changes to the baseline statement.

  8. Click Generate explain plan NW_generate_explain.png to explain the edited What-If scenario.

    Important

    You cannot edit the What-If scenario after it is explained.

  9. (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.
  10. Compare the resulting scenario with the baseline or with another What-If scenario as explained in Comparing statements.
  11. Continue from Step 7 until you have fully tuned the statement.
  12. If you want to generate the tuned statement, click Generate to copy the DDL. For more information, see Generating a tuned statement.

This section contains the following topics :

 

 

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