Creating a What-If scenario


Use the following procedure to create a What-If scenario from a source statement and then compare it to Explain results.

To create a What-If scenario

New BMC Workbench console
  1. In the Performance perspective, select the source statement from a Tuning session.You can use a baseline statement or one of the What-If scenarios that you have previously created.

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

  2. Click NW_create_what_if.png to create a What-If scenario.
  3. (Optional) On the SQL tab, edit the scenario if needed:
    1. Enter a unique name for the What-If scenario.
       If you do not give the scenario a new name, by default BMC Workbench adds an incremental number as a suffix to the source statement name.
    2. Edit the following details of the scenario:
      • DB2 connection

        Success

        Tip

        Click NW_plug_connect_square_green.pngto specify which DB2 connections to include in your list of favorite connections.

      • table qualifier
      • Explain type
      • degree.
    3. Edit the SQL statement.
  4. (Optional) On the Indexes tab, modify the indexes.For more information, see Creating-and-editing-a-What-If-index-scenario.
  5. When finished, click Generate explain plan NW_generate_explain.png.
Classic BMC Workbench console
  1. In the Performance perspective, select the source statement from a Tuning session.You can use a baseline statement (identified by BaselineStmt-24.png) or one of the What-If scenarios that you have previously created (identified by WhatIf-24.png).

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

  2. Click What-If WhatIf-24.png .
  3. (Optional) On the SQL tab, edit the scenario if needed:
    1. Enter a unique name for the What-If scenario.
      If you do not give the scenario a new name, by default BMC Workbench adds an incremental number as a suffix to the source statement name.
    2. Edit the following details of the scenario:
      • DB2 connection

        Success

        Tip

        Click ViewFavoritesList-24.png to specify which DB2 connections to include in your list of favorite connections.

      • table qualifier
      • Explain type
      • degree
    3. Edit the SQL statement.
  4. (Optional) On the Indexes tab, modify the indexes.For more information, see Creating-and-editing-a-What-If-index-scenario.
  5. When finished, click Generate explain plan explain-24.png.

Where to go from here

You can now compare this What-If scenario with another scenario or baseline statement.

Related topic


 

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

BMC Workbench for DB2 12.1