I need to optimize my database to use less memory of the CPU, because i recive an error frequently from my hosting company. I also send them an e-mail and this is the reply: Dear Customer, This error means that you have gone over the CPU limit with us. The site is always calculating how much CPU usage you are using in an average 60 second time frame. If you go above the limit, you will get this message no matter where on your site you go. Our system keeps taking averages and as soon as the average goes below the limit, your site automatically comes back. It usually only take less than 5 minutes to come back. You can use half of the processing power of your server box over a running 60 second time period. So for example, on your 8x core server you can use 240 CPU seconds over 60 real seconds (Looking at it another way you can use 8-10 GHz at all times). To see how much your usage was, there are logs in your account in the File Manager in the cPanel. Open to the Home folder and then go to /tmp/cpu_exceeded_logs/ then you can see your usage. Check what was your cause first, but usually this happens from MySQL queries and you can try to optimize your database in PHPMyAdmin in the cPanel, or empty out some of your tables if it has large amounts of old data. More information About how to deal with CPU exceeded errors can be found at the following URL. http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&id=498 If someone can help me with this I will pay him trough paypall. Thank you.
I can optimize the database for you, however, I cannot guarantee that it will meet the requirements of your hosting company. Depending on their limitations it may be time to find a new hosting company. You can email me at info@jgorski.com
You can use the "Explain SQL" option in phpmyadmin to analyse your queries. Also try reducing the number of MySQL queries by caching.
When looking through your CPU listing it mentions queries taking huge amount of time. So I would start with an investigation in your mysql_slow_queries log which should contain all queries taking longer then a predefined duration. Please send or PM that file that would be a good starting point since the DB is eating CPU time according to you CPU logs.