Viewing Slow Query Logs of a DB Instance
Scenarios
This function displays a chart of SQL statements that are taking too long to execute and allows you to sort slow SQL statements by multiple dimensions, such as by user, host, or SQL template. It helps you quickly identify bottlenecks and improve instance performance.
Procedure
- Log in to the management console.
- Click
in the upper left corner of the page and choose Databases > Relational Database Service. - On the Instances page, click the target instance name to go to the Summary page.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click the Slow Query Logs tab.
This function is only available with Advanced DBA Assistant.
- You can view slow queries over time and you can see the slow log archive history for the last 1 hour, last 3 hours, last 12 hours, or a custom time period (spanning no more than one day).
- To export slow query log details or statistics, click the Details or Statistics tab above the log list and click Export on the tab page.
Follow-up Operations
To view historical export records, do as follows:
- Above the log list, click the Details or Statistics tab.
- Click View All Export Records. The displayed dialog box shows all historical export records.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.