Viewing alerts generated for high-cost SQL statements


(BMC.DB2.SPE2310)

The SQL Alerts app displays BMC AMI SQL Performance interval alerts generated for SQL statements whose cost has passed a user-defined threshold.  BMC AMI Apptune for Db2  unloads data at the end of the interval, checking for the following patterns of SQL statement behavior:

  • Disruption: A new high-cost SQL statement is detected.
  • Spike: An existing SQL statement is costing significantly more than it did in the previous interval for a similar day or time of day
  • Degradation: An existing SQL statement is costing significantly more than it did in the recent past for a similar day or time of day

For more information about BMC AMI SQL Performance interval alerts, see the following documentation:

When the app opens, it displays alerts for the last seven days for subsystems for which an Apptune user has defined an alert. The SQL Alerts app displays the following views:

View

Description

Subsystem summary

Displays a bar chart that displays the number of alerts recorded within a time frame for each subsystem where the alerts were found. It also lists the alerts for a selected subsystem.

Alert detail

Displays the details of an alert and the historical data that provided the basis for the alert. The historical data can be displayed in either graph or tabular form.

Statement trend analysis

Displays performance statistics for the SQL statement that caused the alert by passing the user-defined threshold. For more information, see BMC AMI Apptune for Db2.

By default, BMC AMI Command Center displays the alerts for the first subsystem displayed in the bar chart at the top of the view.

To view alerts generated by SQL Performance for SQL statements

  1. In the upper-left corner of the console, click Apps.
  2. Click SQL Alerts NW_sql_alerts.png.
  3. From the Timeframe list, select an interval from the following options:

    Option

    Description

    Today

    Displays Apptune interval alerts generated since midnight of today's date

    7 Days

    (Default) Displays Apptune interval alerts generated within the last seven days

    30 Days

    Displays Apptune interval alerts generated within the last 30 days

    Custom Date

    Displays Apptune interval alerts for a particular date

    For more information, see To select a custom date

    Custom Interval

    Displays Apptune interval alerts for a range of dates

    For more information, see To select a custom interval.

  4. To display alerts for a Db2 subsystem, perform one of the following actions:
    • On the graph, click a Db2 subsystem bar.
    • From the Alerts on list, select a Db2 subsystem.
  5. To view the details for a row, perform one of the following actions:
    • Select the row and click Details.
    • Double-click the row.
  6. To choose the display format for the historical basis for the alert, select one of the following options:
    • Chart—Displays the historical basis as a graph. This option is available for degradation and spike alerts.
    • Tabular—Displays the historical basis as a table. This option is available for all alerts.
  7. Click Back back_icon_app-24.png to return to the subsystem summary view.
  8. (Optional) To investigate performance trends on the statement that triggered an alert, select a row and click Trend.
    For more information, see Investigating-performance-trends-in-SQL-statements.
  9. Click Back back_icon_app-24.png to return to the subsystem summary view.
  10. (Optional) Click Refresh refresh_app-24.png  to update the information displayed in the subsystem summary view.

To select a custom date

  1. From the Timeframe list, select Custom Date.
    The Select Custom Timeframe dialog box is displayed.
  2. To change the year, click the back and next arrows as shown in the following figure:
    NW_year_timeline_date.png
  3. To change the month, click the back and next arrows as shown in the following figure:
    NW_month_timeline_date.png
  4. On the calendar, select the date on which you want to view the alerts.
  5. Click OK.

To select a custom interval

  1. From the Timeframe list, select Custom Interval.
    The Select Custom Timeframe dialog box is displayed.
  2. Select Start.
    NW_startdate_timeline_rng.png
  3. To change the year, click the back and next arrows as shown in the following figure:
    NW_year_timeline_rng.png
  4. To change the month, click the back and next arrows as shown in the following figure:
    NW_month_timeline_rng.png
  5. On the calendar, select the start date of the interval.
  6. Select End.
    NW_enddate_timeline_rng.png
  7. (Optional) Change the year and month as shown in steps 3 and 4.
  8. On the calendar, select the end date of the interval.
  9. Click OK.

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*