SQL Queries Too Slow
- 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.
For details on viewing MySQL logs, see section Viewing Slow Query Logs.
For details on viewing PostgreSQL logs, see section Viewing and Downloading Error Logs.
For Microsoft SQL Server, you can query dynamic management views (DMVs) to locate the cause of slow queries. For details on DMVs, visit the Microsoft official website.
- You can view the CPU usage of RDS DB instances to facilitate problem locating.
For details, see Configuring Displayed Metrics.
- Create read replicas to offload read pressure on primary DB instances.
- When multiple associated tables are queried, indexes must be created for the associated fields.
- Do not use the SELECT statement to scan all tables. You can specify fields or add the where condition.
Next Article: Storage Space Information of RDS DB Instances
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.