Hello, One of my site using lot of mysql process or i should say server process. I just checked, right now its 13.89%. It starts showing red icon in whm for cpu. Never happened this before, its happening after i opened high traffic site to this server. It uses too many queries at once. What is the best solution for this? Any suggestion would help.
It could help to create indexes on your table, querys will run faster in this case. http://dev.mysql.com/doc/refman/5.0/en/create-index.html You can also try to remove some joins in the SQL if possible, there should never be more then 3 joins in one question (however, i always break this rule, but i dont have a massive traffic site)
You can limit the no. of queries for a particular DB by using "max_questions" ......... Search for it in mysql.com & you will get the result.
i just searched on mysql.com, but it says it will limit the number of times perticular user can connect. That wouldnt solve the problem.
You should log slow queries and see if you can optimize them. http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html