This topic provides an overview of the Slow Log function in RDS MySQL. With this function, you can view the trends and statistics of slow SQL statements.
CloudDBA in RDS MySQL helps you to manage slow SQL statements throughout the entire lifecycle from dimensions including detection, analysis, diagnosis, optimization, and tracking.
The MySQL version and RDS edition are as follows:
- MySQL 8.0 High-availability Edition
- MySQL 5.7 High-availability Edition/Enterprise Edition
- MySQL 5.6
- MySQL 5.5
Handle slow SQL statements
- Log on to the RDS console.
- Select the target region.
- Find the target RDS instance and click the instance ID.
- In the left-side navigation pane, choose .
- Use one of the following two methods to view Slow Log Trend:
Note By default, the system displays slow SQL statements of the Last 24 Hours.
- Click Last 24 Hours to view slow SQL statements within the last 24 hours.
- Set the query start date and end date, and then click Search to view slow SQL statements within up to seven days.
- View the Slow Log Trend line chart. If you click a time point at which slow SQL statements were detected, then you can view statistics of slow SQL statements in the lower Slow Log Statistics section.
- Use one of the following two methods to locate problems that cause slow SQL statements:
- Find the target slow SQL statement and in the Actions column click the sample button to view details about the slow SQL statement.
- Find the target slow SQL statement and in the Actions column click the optimize button to view diagnostics and optimization information
about the slow SQL statement.
Note You can purchase a database expert service. This service provides functions, such as emergency handling, health diagnosis, performance optimization, escort, and Oracle migration, that are beyond the service scope of the cloud database.