During the use of RDS MySQL, queries with long running time may occur due to some reasons, such as SQL injection, poor SQL execution efficiency, or DDL statement-triggered Lock wait.
Instructions for more information about how to wait for the metadata lock, see resolves the problem that metadata locks cause database operations to fail.
Generally speaking, query over a long period unless it is a BI or report query it is meaningless for applications and consumes system resources. For example, many long-term queries may cause problems such as excessive CPU, IOPS, and connections, resulting in system instability.
To avoid long query execution, see the following examples.