Updated on 2025-10-10 GMT+08:00

Viewing Top SQL Statements of a DB Instance

Scenarios

Top SQL shows the SQL queries that have been contributing the most to DB load. You can sort them by multiple dimensions.

Procedure

  1. Click in the upper left corner and select a region.
  2. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  3. On the Instances page, click the target instance name.
  4. In the navigation pane, choose SQL Analysis and Tunning under DBA Assistant.
  5. Click the Top SQL tab.

    This function is only available with Advanced DBA Assistant.

  6. Click Upgrade DBA Assistant. In the displayed dialog box, you can learn about the enhanced features and billing rules.

    Figure 1 Upgrading DBA Assistant

  7. After the upgrade is complete, view top SQL statements of your instance.
  8. View execution durations of the top SQL statements in the last 1 hour, last 3 hours, last 12 hours, or a custom time period (spanning no more than one day).