This topic describes how to use Database Autonomy Service (DAS) to enable, use, and disable slow query log analysis for ApsaraDB for MongoDB instances. To manage multiple database instances, you can view global slow query log trends. This feature allows you to find the most frequently executed slow SQL statement and the instance where the number of executed slow SQL statements is the largest.
Enable slow query 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.
Note 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 also find the slow query log where the SQL requests scan the largest average number of rows.
- You can click Sample in the Actions column to view the request details, including the slow query log information, the username, and the client IP address.
Global slow query log trend
In the left-side navigation pane of the DAS console, choose Request Analysis > Slow Logs to view the slow query log trends of all connected databases.