Azure MySQL Flexible Server Extremely Slow

Igor Deutsch 0 Reputation points
2024-04-04T16:08:44.34+00:00

I have a database server (MySQL Flexible) and it was working fine, but the last few days it has become very slow. There were no changes in the application, the code of application did not change. In the information_schema.processlist there are no active processes, and no opened trasactions. What is the server doing? What can you do about it?

The screenshot shows the last 30 days

User's image

Thanks a lot

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
757 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rahul Randive 9,091 Reputation points Microsoft Employee
    2024-04-04T16:19:26.1233333+00:00

    Hi @Igor Deutsch

    Please check the Query Performance Insight which is designed to help you spend less time troubleshooting database performance by providing such information as:

    • Top N long-running queries and their trends.
    • The query details: view the history of execution with minimum, maximum, average, and standard deviation query time.
    • The resource utilizations (CPU, memory, and storage).

    In Query Performance Insight, two metrics that can help you find potential bottlenecks are duration and execution count. Long-running queries have the greatest potential for locking resources longer, blocking other users, and limiting scalability.

    You can also Configure slow query logs by using the Azure portal- In the server parameters you may need to select ON for slow_query_log parameter Here is reference document https://video2.skills-academy.com/en-us/azure/mysql/flexible-server/concepts-slow-query-logs#configure-slow-query-logging

    You can also try upscaling an instance if that make any difference and later downscale.

    In some cases, a high execution count can lead to more network round trips. Round trips affect performance. So execution count can help to find frequently executed ("chatty") queries. These queries are the best candidates for optimization.

    Thank You!