Help Center/ Relational Database Service/ Troubleshooting/ RDS for MySQL/ Other Issues/ Millisecond-Level SQL Statements Recorded in Slow Query Logs
Updated on 2024-12-13 GMT+08:00

Millisecond-Level SQL Statements Recorded in Slow Query Logs

Scenario

The value of long_query_time is 1 (unit: second) for RDS for MySQL slow query logs. However, there are SQL statements whose average execution time is less than 1 second in slow query logs.

Troubleshooting

Check whether log_queries_not_using_indexes is set to ON. If yes, the SQL statements not using indexes will also be recorded in slow query logs.