Help Center/
Relational Database Service/
Best Practices/
RDS for MySQL/
How Do I Improve the Query Speed of My RDS for MySQL Instance?
Updated on 2024-11-21 GMT+08:00
How Do I Improve the Query Speed of My RDS for MySQL Instance?
The following are some suggestions provided for you to improve the database query speed:
- View the slow query logs to check if there are any slow queries, and review their performance characteristics (if any) to locate the cause. For details about how to view RDS for MySQL logs, see Viewing and Downloading Slow Query Logs.
- View the CPU usage of your RDS DB instance to facilitate troubleshooting. For details, see Configuring Displayed Metrics.
- Create read replicas to offload read pressure on the primary DB instance. For details, see Introducing Read Replicas.
- Enable read/write splitting after read replicas are created. Write requests are automatically routed to the primary DB instance and read requests are routed to read replicas by user-defined weights.
- Increase the CPU or memory specifications for DB instances with high load. For details, see Changing a DB Instance Class. To temporarily reduce the load, you can kill sessions. For details, see Managing Real-Time Sessions.
- Add indexes for associated fields in multi-table association queries.
- Specify a field or add a WHERE clause, which will prevent full table scanning triggered by the SELECT statement.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot