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

Millisecond-Level SQL Statements Recorded in Slow Query Logs

Scenario

The value of long_query_time for RDS for MySQL slow query logs is set to 1 second. 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.