Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Command Center for Db2 13.2

Identifying performance issues in SQL statements


The SQL Analysis app displays the top 100 SQL statements for a subsystem that use the most CPU time. By default, the app displays the SQL statements for the last subsystem selected in the Options dialog box for the app. The SQL Analysis app displays the following views:

  • Subsystem summary
  • Statement detail

By default, the Command Center displays the Options dialog box when you open the SQL Analysis app. You can suppress the dialog's display by clearing Always show this panel on startup in the Options dialog box.

Use the following procedure to view a report of SQL statements with performance issues for a subsystem.

To identify performance issues in SQL statements

  1. In the upper left corner of the New console, click Apps.
  2. Click SQL Analysis NW_sql_arrow_chart_teal.png.
  3. (SPE2104)

     In the Options dialog box, select the following options:

    1. From the Subsystem list, select the Db2 subsystem that you need to investigate.
    2. From the Timeframe list, select an interval from the following options:

      Option

      Description

      Default Interval

      If you selected a single subsystem, the default interval start and end times are determined by the current APPTUNE interval. If you selected more than one subsystem, the default interval starts at the earliest interval among all active Db2 subsystems defined to the chosen data collector. It ends at the current date and time.

      Last Hour

      The results include SQL statements in all APPTUNE intervals within the last hour, based on the server’s time zone.

      Last 24 Hours

      The results include SQL statements in all APPTUNE intervals within the last 24 hours, based on the server's time zone.

      Today

      The results include SQL statements in all APPTUNE intervals since midnight, based on the server's time zone.

    3. Click OK.
      The subsystem summary is displayed.
  4. (Optional) Click Filter  Filter_app_Contents-24.png  to limit the results displayed based on one or more of the following fields:

    If you add a filter, BMC AMI Command Center displays  (Filters Applied)  next to the title of the results pane and changes the color of the filter icon (NW_filter_o_orange.png).
    For more information, see Filtering-the-result-set-for-an-SQL-app.

  5. (SPE2104)

     (Optional) From the Timeframe list, select an interval to adjust the time period in which you want to view results. If you select Custom Interval , the Time Intervals dialog box is displayed. For more information, see Selecting-the-time-interval-for-SQL-apps.

  6. From the Subsystem list, select a Db2 subsystem to change the results viewed.
  7. (BMC.DB2.SPE2210)

     (Optional) To export the displayed list of SQL statements, perform the following steps:

    1. Click Generate Report.
    2. Select one of the following options:

      Option

      Description

      CSV - With SQL text preview

      Exports all the rows in the current list to a CSV file

      CSV - With full SQL text

      Exports all the rows in the current list to a CSV file

      The full SQL text for each row is included in the CSV file.

      PDF

      Exports all the rows in the current list to a PDF file

      The full SQL text for each row is included in the PDF file.

      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.

    3. Enter a name for the file.
    4. Click Save .
  8. To view the details for a row:
    • Select the row and click Details.
    • Double-click the row.
  9. (Optional) To analyze the statement, click Explain and then select one of the following options:

    • Dynamic
    • Static
    • Explain Package

    For more information, see Performance-perspective.

  10. Click back_icon_app-24.png to return to the subsystem summary view.
  11. (SPE2104)

     (Optional) Click Options NW_gear.png to open the Options dialog box and select new search options.

  12. (Optional) Click refresh_app-24.png to update the information displayed in the subsystem summary view.
Classic console
  1. In the upper right corner of the Classic console, click Apps.
  2. Click SQL Analysis SQL_analysis_app-64.png.
  3. Select the Subsystem you want to investigate.
  4. (optional) Click Filter Filter_app_Contents-24.png to limit the results displayed based on one or more of the following fields:

    • Plan
    • Program

    For more information, see Filtering-the-result-set-for-an-SQL-app.

  5. (Optional) Click Filter Time Interval Select_time_interval-24.png to adjust the time period in which you want to view results. For more information, see Selecting-the-time-interval-for-SQL-apps.
  6. To view the details for a row:
    • Select the row and click Details.
    • Double-click the row. 
  7. (Optional) To analyze the statement, click the Explain NW_generate_explain.pngmenu and then select Dynamic.
  8. Click back_icon_app-24.png to return to the subsystem summary view.
  9. (Optional) Click refresh_app-24.png to update the information displayed in the subsystem summary view.

Where to go from here

Use the Performance perspective to analyze an SQL statement with poor performance. For more information, see Tuning-SQL.

 

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