Viewing Slow Query Logs of a DB Instance
Scenarios
Slow Query Log 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 and select a region.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the DB instance name.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click the Slow Query Log tab.
Slow SQL Analysis needs to be purchased separately. To use this function, subscribe to Intelligent O&M first.
- Click Subscribe. In the displayed dialog box, you can learn about Intelligent O&M functions and pricing.
- After subscribing to Intelligent O&M, view slow queries over time of your instance.
- 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).
Figure 1 Viewing slow queries over time
- View slow query log details and template statistics.
- To export slow query log information, click Export.
- To view log export history, click View Export List.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot