Vladimir
Vladimir

Reputation: 157

Mysql very slow query, but fast working after reboot (CPU usage 99%)

I have a SQL query generated ORM (Hibernate). Query is big, but after restart MySQL service it works fast (0.2 sec.). A few days later, the query is becoming slower and slower (> 1 min.). I run DESCRIBE. And I see that the query plan is different. But I do not know what the problem is and how I can remedy the situation.

Fast:

Fast

Slow:

Slow

Generated query

Upvotes: 0

Views: 786

Answers (1)

Harish Rawat
Harish Rawat

Reputation: 99

Please check the number of connection used in your MySQL, I have to doubt there are so many connections are opened or used that's why query execution plan was slow, but after reboot it comparatively fast..

Hop its work!

Upvotes: 1

Related Questions