Updated on 2026-10-08 GMT+08:00

Viewing Slow Query Logs of a DB Instance

Scenarios

Slow SQL analysis provides statistics on recorded slow SQL queries by user source, client source, and SQL template. It also offers time series trend analysis, helping you identify slow SQL queries from multiple perspectives and tune them quickly.

Procedure

  1. Log in to the RDS console.
  2. Click in the upper left corner and select a region.
  3. On the Instances page, click the target instance name to go to the Summary page.
  4. In the navigation pane, choose SQL Analysis and Tuning under DBA Assistant.
  5. Click the Slow Query Logs tab.

    This feature needs to be purchased separately. To use it, subscribe to Intelligent O&M first.

  6. Click Upgrade DBA Assistant. In the displayed dialog box, you can learn about the enhanced features and billing rules.

    Figure 1 Upgrading DBA Assistant

  7. After the upgrade is complete, view slow SQL query changes of the instance.
  8. Check slow queries over time and archived slow query logs in the last 1 hour, last 3 hours, last 12 hours, or a custom time period (spanning no more than one day).

    Figure 2 Viewing slow queries over time

  9. 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.