In ApsaraDB RDS for MySQL, Database Autonomy Service (DAS) provides the full SQL statistics feature. You can view and compare the number of execution times, execution duration, and execution duration distribution of each SQL statement over a specific time range. This allows you to identify problem SQL statements.

Prerequisites

  • Your RDS instance runs one of the following MySQL versions and RDS editions:
    • MySQL 8.0 on RDS High-availability or Enterprise Edition
    • MySQL 5.7 on RDS High-availability or Enterprise Edition
    • MySQL 5.6
    • MySQL 5.5
  • The SQL Explorer feature is enabled for your RDS instance. For more information, see SQL Explorer.
    Note You can enable the SQL Explorer feature by following the instructions in the ApsaraDB RDS console.

Background information

The full SQL statistics feature is provided in two editions based on the SQL Explorer feature: Basic Edition and Professional Edition.
  • If you are using the Trial Edition of SQL Explorer, the full SQL statistics feature is provided in the Basic Edition. In the Basic Edition, you can view only the number of execution times and the execution duration of each SQL statement.
  • If you are using the Paid Edition of SQL Explorer, the full SQL statistics feature is provided in the Professional Edition. The Professional Edition has the following advantages over the Basic Edition:
    • Optimized data analysis and fast responses to improve user experience
    • Data comparison and source statistics
    • Detection of risky SQL statements, SQL injections, and new access sources

Billing

You only need to pay for the storage of SQL logs that are generated by the SQL Explorer feature. If the full SQL statistics feature is charged after its public preview ends, you will receive notifications.

Precautions

  • In the Professional Edition, the query intervals for Time Range and Source Statistics cannot exceed three days.
  • In the Basic Edition, the query intervals for Full Request Analysis cannot exceed one day.
  • Data is updated at 10-minute intervals.

Procedure

  1. Log on to the ApsaraDB for RDS console.
  2. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where your RDS instance resides.
    Select a region
  3. Find your RDS instance and click its ID.
  4. In the left-side navigation pane, choose Database Autonomy Service (CloudDBA) > Full SQL Statistics.
    Note For more information, see Use full SQL statistics.