PolarDB for MySQL provides the slow SQL analysis feature. You can view the trends and statistics of slow SQL statements and obtain suggestions and diagnostic analysis.
View trends and statistics for slow SQL statements
- Log on to the ApsaraDB for PolarDB console.
- In the upper-left corner of the console, select the region where the cluster is located.
- Click the ID of the cluster.
- In the left-side navigation pane, choose .
- You can use any of the following methods to view the Slow Log Trend:
Note By default, the slow log trends of the last 24 hours are displayed.
- Click Last 24 Hours to view the slow log trend of the last 24 hours.
- Specify the start time and end time of the query and click Search to view the slow log trends for up to seven days.
- On the trend chart of Slow Log Trend, click the specific period of time to view Slow Log Statistics at the lower part of the page.
- You can troubleshoot slow SQL statements in the following ways:
- Click Sample in the corresponding Actions column to view the details of the slow SQL statement.
- Click Optimization in the corresponding Actions column to view the optimization suggestions of the diagnosis.
Note You can also click Expert Service to purchase Database Expert Service. Database Expert Service provides professional database services that are not provided by ApsaraDB for PolarDB, for example, emergency solutions, health diagnosis, performance optimization, security, and Oracle migration.