All Products
Search
Document Center

Database Autonomy Service:10-second SQL analysis

Last Updated:Oct 25, 2023

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

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

  4. In the left-side navigation pane, click Instance Sessions.

  5. On the Instance Sessions page, click 10s SQL Analysis.