Inconsistent speed for query results
What is the best way to troubleshoot why sometimes a query will return results in one second, while sometimes it will take over ten seconds? In fact, sometimes the webpage that makes use of the query will time out. I can understand if my query was poorly written and, if so, then it should consistently run slow. Right? I tail the Apache error log, looking for clues when this sporadic event happens, and it doesn't ever record anything when it does.
Thank you!
-
There are a number of factors that could contribute to this. Server load, connections to the server, queries running, etc... So many variables. Keep [url=http://jeremy.zawodny.com/mysql/mytop/]mytop running when you're seeing slower queries. I bet you'll see quite a few queries there. Also, you may want to consider MariaDB over MySQL, and cache as much as you can, to ram, not disk 0 -
Hello, You may also find value in tuning your MySQL configuration. The following thread offers information on how to tune your MySQL configuration for optimal performance: mysqlmymonlite.sh server stats gathering tool for cPanel Server Thank you. 0
Please sign in to leave a comment.
Comments
2 comments