Analyzing a statement from the Db2 statement cache


Use the following procedure to select and tune any statement in the Db2 statement cache. You must ensure that the workspace contains a Db2 object view that contains the statement.

To analyze a statement from the Db2 statement cache

  1. In the Performance perspective, click the Add view NW_plus_circle_o.png menu arrow and then click Add SQL Statement Cache View.
  2. In the Add DB2 Statement Cache View dialog box, from the DB2 Connection list, select a Db2 subsystem.

    Important

    ClickNG_plug_connect_square_blue.png and specify which Db2 connections to include in your list of favorite connections.

  3. In the Filter box, enter the name of the program that contains the statement. You can use wildcards to return a list of statements contained by programs that match the pattern.
  4. Click OK.In the results pane, a list of statements is displayed.

    Important

    The results pane lists statements up to the limit set by the Maximum rows returned option. The default limit is 5000 statements. For more information, see Setting Command Center options.

  5. (Optional) To sort the results, click the column headers.
  6. Select the desired statement and click Generate explain plan NW_generate_explain.png. The Explain results are displayed along with the following tabs:

 

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