This topic describes how to use Database Autonomy Service (DAS) to enable, use, and disable slow query log analysis for Redis instances.
Enable slow query log analysis
By default, slow query log analysis is disabled. To enable the feature, perform the following operations:
- Log on to the DAS console.
- In the left-side navigation pane, click Instance Monitoring, and then find the instance. Make sure that the instance is in the Accessed state.
- Click the ID of the instance. On the instance details page, choose Request Analysis > Slow Logs in the left-side navigation pane. On the page that appears, click the Log Trend tab. On the Log Trend tab, click Enable Slow Log Analysis.
Slow query log trends
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 a specific period of time.
- The slow query log analysis feature 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, which include the slow query log information and the client IP address.