Updated on 2022-09-21 GMT+08:00

Why Is My SQL Query Running So Slow?

  1. You can view the slow SQL logs to check whether any slowly executed SQL queries exist and view their performance characteristics (if any) to locate the cause.
  2. View the CPU usage metrics of RDS DB instance to facilitate troubleshooting.
  3. Create read replicas to offload read pressure on primary DB instances.
  4. When multiple associated tables are queried, indexes must be created for the associated fields.
  5. Do not use the SELECT statement to scan all tables. You can specify fields or add the WHERE condition.