Space announcement

   

This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Analyzing an ad hoc statement

Use the following procedure to browse and copy a statement stored in a data set, or to write a statement into the statement box of the Performance perspective.

Note

You can set values that are persistent for all ad hoc statements that you create in the current session in the current workspace. For details, see Setting SQL tuning options.

To analyze an ad hoc statement

 New console
  1. In the Performance perspective, click the Add view menu arrow and then click Add SQL Statement View.
  2. Complete the SQL tab:
    1. Enter a name for the statement.
    2. From the DB2 Connection list, select a Db2 subsystem.

      Tip

      Click and specify which Db2 connections to include in your list of favorite connections.
    3. ( optional ) Enter the table qualifier.

      BMC AMI Command Center for Db2 uses this qualifier if the table in the SQL is unqualified.

    4. For the Explain Type, select Dynamic.
    5. At Degree, select the degree of parallel processing to allow:
      • Select Any to allow parallel processing.

      • Select 1 to prohibit parallel processing.

    6. Type or paste the SQL statement into the SQL statement box.
  3. Click Generate explain plan .

    The Explain results are displayed along with the following tabs:

 Classic console
  1. Click the Performance perspective.
  2. Click Add SQL Statement View .
  3. Complete the SQL tab:
    1. Enter a name for the statement.
    2. Select a Db2 subsystem by using either of the following methods:
      • Type the full or partial name of a Db2 connection to select the first subsystem that matches this value in the list of favorite connections.

      • Use the menu arrow to display and choose from a list of connected subsystems.

        Tip

        Click and specify which Db2 connections to include in your list of favorite connections.
    3. ( optional ) Enter the table qualifier.

      BMC AMI Command Center for Db2 uses this qualifier if the table in the SQL is unqualified.

    4. For the Explain Type, select Dynamic.
    5. At Degree, select the degree of parallel processing to allow:
      • Select Any to allow parallel processing.

      • Select 1 to prohibit parallel processing.

    6. Type or paste the SQL statement into the SQL statement box.
  4. Click Generate explain plan .

    The graphical Explain diagram of the SQL statement is displayed.


Was this page helpful? Yes No Submitting... Thank you

Comments