In ApsaraDB RDS for MySQL, DAS provides the full SQL statistics feature. This feature allows you to view and compare the number of executions, execution duration, and execution duration distribution of each SQL statement within 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 in the High-availability or Enterprise Edition
    • MySQL 5.7 in the High-availability or Enterprise Edition
    • MySQL 5.6
    • MySQL 5.5
  • SQL Explorer is enabled for your RDS instance. For more information, see SQL Explorer.
    Note You can also follow the instructions in the ApsaraDB for RDS console to enable SQL Explorer.

Background information

The full SQL statistics feature is based on SQL Explorer. This feature has the Basic Edition and Professional Edition.
  • If your SQL Explorer is of the Trial Edition, the full SQL statistics feature must be of the Basic Edition. You can only view the number of executions and the execution duration of each SQL statement.
  • If your SQL Explorer is of the Paid Edition, the full SQL statistics feature must be of the Professional Edition. The Professional Edition provides the following functions:
    • Optimized data analysis and fast responses
    • Comparative data display and source statistics
    • Detection of dangerous SQL statements, SQL injection, and new access sources

Billing

Currently, you can use the full SQL statistics feature for free, but you must pay for the storage of audit logs generated by SQL Explorer. If this feature is billed after its public preview ends, you will receive notifications.

Precautions

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

Open the Full SQL Statistics page

  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 the target RDS instance resides.
    Select a region
  3. Find the target instance and click the instance ID.
  4. In the left-side navigation pane, choose Database Autonomy Service (CloudDBA) > Full SQL Statistics.
    Note For more information, see Full SQL statistics.