This topic describes how to use the Database Autonomy Service (DAS) console to enable, use, and disable the feature of slow query log analysis for Redis instances. DAS is previously known as Hybrid Cloud Database Management (HDM).
- You remain logged on to the DAS console.
- DAS is connected to ApsaraDB for Redis instances, user-created Redis instances, or Redis instances that run on other clouds.
By default, the feature of slow query log analysis is disabled. To enable the feature, follow these steps:
- In the left-side navigation pane, click Instance Monitoring. On the page that appears, find the target database instance and check whether the instance is in the Accessed state. If the instance is in the Accessed state, move on to the next step.
- Click the ID of the target instance. In the left-side navigation pane of the page that appears, click Slow Logs.
- On the page that appears, click Enable Slow Log Analysis.
After about half an hour, you can view the details of slow queries, such as the general trends, the top slow queries, and the samples and sources of slow queries.
In the Slow Log Trend section, you can view the number of slow SQL statements for the instance by hour.
You can click a dot in the chart to view the slow query log details that are collected at the specific time.
The feature of slow query log analysis shows the slow query statistics and provides an easy method for you to find the most frequently executed slow SQL statement and the most time-consuming slow SQL statement.
You can click Sample in the Actions column to view the request details, including the slow query log information and the client IP address.