Use Performance Hub to Analyze SQL Performance

You can use Performance Hub to monitor and analyze SQL performance and obtain greater visibility into performance issues.

Performance Hub for MySQL HeatWave DB systems displays SQL statement information for the selected time period. Using Performance Hub, you can improve the performance of your database applications by monitoring query performance. It enables you to accurately pinpoint SQL code that is the root cause of a slow down; and improve SQL code during active development as well as continuously monitor and tune queries running on production systems.

To go to Performance Hub, click Performance Hub on the MySQL database details page in Database Management. For information, see Monitor a Single MySQL HeatWave DB System.

Note

You can also access Performance Hub from the DB system details page in the MySQL HeatWave service.

In Performance Hub, select an option in the Last seen drop-down list to specify the duration for which you want to monitor SQL activity and view the last seen SQL statements. If you select the Custom option in the Last seen drop-down list, you can specify a custom duration within the last seven-day period. The Time range field displays the time period depending on the selected Last seen option. You can also click the Time range field to specify a custom duration within the last seven-day period. To refresh the data in Performance Hub, click Refresh in the upper-right corner.

Based on the selected time period, relevant information is displayed in the following charts and section:

  • Average statement latency (seconds): Displays the average latency (in seconds) for the SQL statements executed against the DB system.

    Click View metrics in the upper-right corner and select Statement count to view the Statement count chart. This chart displays the total number of SQL statements executed and the number of SQL statements offloaded to HeatWave for execution, during the selected time period.

  • Top 100 by <indicator>: Displays the aggregated summary information for the top SQL statements based on a selected indicator such as average statement latency, total execution count, or execution status. In this section, you can filter and monitor SQL statements to quickly identify expensive statements. To filter the SQL statements and customize the information displayed in this section, select or deselect options in the HeatWave offload status and Columns drop-down lists.

    The SQL statements listed in the Top 100 by <indicator> section are normalized statement digests, and the data shown is aggregated from the time each statement was first seen. Using the details displayed in this section, you can identify the SQL statement causing performance issues and click the link in the Query column to examine the SQL statement in the SQL details panel. In the SQL details panel, you can:

    • Use the statement digest ID to write a query and obtain additional information from the DB system.
    • View the normalized SQL.
    • Monitor detailed information about the execution time, number of rows, and temporary tables. For example, you can monitor the number of rows that were examined or returned and the number of temporary tables that were created.

    For information on statement digests, see Performance Schema Statement Digests and Sampling.