Help Center/ Relational Database Service/ Troubleshooting/ RDS for MySQL/ Other Issues/ Rows Recorded in the SQL Diagnosis Result Far Less Than the Scanned Rows Recorded in Slow Query Logs
Updated on 2023-11-03 GMT+08:00

Rows Recorded in the SQL Diagnosis Result Far Less Than the Scanned Rows Recorded in Slow Query Logs

Scenario

When SQL diagnosis is performed on the DAS console for an RDS for MySQL DB instance, the number of rows recorded in the execution plan in the SQL statement diagnosis result is far less than the number of scanned rows in slow SQL logs.

Possible Causes

When the query optimizer determines to query a table through full table scanning, the rows column in the execution plan indicates the estimated number of rows to be read. The number of rows in the execution plan is not the number of scanned rows, because the table may be scanned repeatedly during the query.