Database Autonomy Service (DAS) provides the 10-second SQL analysis feature to help you analyze SQL statements when an alert is generated due to a rapid increase in the CPU utilization, number of active sessions, or response time on a database instance.
Prerequisites
The database instance that you want to manage meets the following requirements to enable the 10-second SQL analysis feature:
The database instance is connected to DAS and is in the Normal Access state. For more information, see Connect a database instance to DAS.
The database instance is of one of the following types:
ApsaraDB RDS for MySQL
Self-managed MySQL databases
PolarDB for MySQL
PolarDB-X 2.0
Overview
When you perform a 10-second SQL analysis on a database instance, the system executes the SHOW PROCESSLIST
statement at an interval of 1 second within a 10-second time window. Then, the system analyzes the returned result sets. The analysis result shows the SQL statements that are most frequently executed and whether slow SQL queries exist within the 10-second time window.
Procedure
Log on to the DAS console.
In the left-side navigation pane, click Instance Monitoring.
On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.
In the left-side navigation pane, click Instance Sessions.
On the Instance Sessions page, click 10s SQL Analysis.