The slow query log feature is enabled by default for ApsaraDB RDS for MySQL. This page explains how to view slow query log details in the console, and covers the collection rules that affect what appears in the logs — including SQL truncation, log loss under high concurrency, and timestamp semantics that vary by engine version.
Collection rules and limits
Understanding these rules helps you interpret log data correctly and troubleshoot missing or unexpected entries.
SQL statement truncation
Slow query logs record SQL statements up to 8,192 bytes. Statements that exceed this limit are truncated. SQL Explorer logs are subject to the same limit. The 8,192-byte limit cannot be adjusted. To identify the complete SQL content, retrieve the full request from your application.
Log loss under high concurrency
If more than 600 slow query log entries are generated within one minute, some entries may be dropped. To reduce this risk, upgrade the minor engine version to 20191212 or later.
Timestamp semantics by engine version
The meaning of the collection timestamp changed across engine versions:
Before versions 20211231 (MySQL 5.7.35) and 20220530 (MySQL 8.0.25): The timestamp records the SQL execution end time.
Since versions 20211231 (MySQL 5.7.35) and 20220530 (MySQL 8.0.25): The timestamp records the SQL execution start time.
If log entries appear out of order, or if timestamps differ from what your application records, check which engine version your instance is running.
View slow query log details
Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region where the instance resides. Click the instance ID.
In the left-side navigation pane, choose Logs > Slow Log Analysis.
On the Slow Log Analysis tab, select the time range. The page displays slow query statistics and log details. Each log entry includes the following fields:
Field Description SQL statement The SQL text recorded for the slow query, truncated at 8,192 bytes if the statement exceeds this limit Access source The client host or IP address from which the query originated Database The database on which the query was executed Execution time The duration of the query in seconds 
You can also view slow query log details on the Slow Log Details tab of the Logs page.
To export slow query log details, use Slow Log Analysis.
What's next
Collection policy for RDS MySQL slow query logs — Learn the parameters that control when a query is recorded as slow.
View error logs and slow query logs — View other log types for the instance.
Update the minor engine version — Upgrade to reduce log loss under high concurrency.