Connecting Tech Pros Worldwide Forums | Help | Site Map

Mysql High usage Problem (help)

Newbie
 
Join Date: May 2007
Posts: 1
#1: May 24 '07
Hi people i need serious help here..

I have a forum and my hosting company suspended it cuz of the high usage of sql.
We did everything to make lower the usage but its still high.

it was

Generated in 2.0792990 seconds (18.30% PHP / 50-80 % MySQL)
MySQL Queries:152 / Global Parsing Time: 0.4743950 / Memory Usage: 4.01 MB
PHP version: 4.4.4 / Server Load: Bilinmeyen / GZip Compression: Enabled


after i go back to default settings

Generated in 2.0792990 seconds (18.30% PHP / 25-60 (smtms 70-80)% MySQL)
MySQL Queries: 22-25 / Global Parsing Time: 0.4743950 / Memory Usage: 4.01 MB
PHP version: 4.4.4 / Server Load: Bilinmeyen / GZip Compression: Enabled

what can i do any more..

thanks..

pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#2: May 25 '07

re: Mysql High usage Problem (help)


Check your queries. Really slow or (to be honest, and nothing personal) poorly-written queries tend to eat up memory and CPU time.

I'd check your slow queries log and try EXPLAINing them.

Make sure your tables are well-indexed; that really helps cut down on the number of rows MySQL has to search.
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,752
#3: May 25 '07

re: Mysql High usage Problem (help)


I'd also try to avoid the LIMIT clause where possible. It has an annoying habit of scanning entire tables even if you only ask for a couple of rows.
Reply