Long "updating" state for mysql db. Does this indicate a problem?

Posted by mrzippy, 10-30-2012, 01:57 PM
Hello, I am working with a customer to try and help him figure out what is "wrong" with his software. He's been complaining that the server hardware is at fault, so I'm trying to help him figure out that it's not hw related. We ran the "mysql> SHOW PROCESSLIST" command and got output like this: In the TIME column, you will notice that the times are rather long. Does this indicate a problem with the code or database or hw? Thanks! (BTW - not sure it matters, but it's a drupal 5 database.

Posted by alyak, 10-30-2012, 02:53 PM
nice picture .... or database designed terrible , or some lock . looks like problem with database design . so simle query must work very fast . check indexes in ad_statistic table show inddexes from ad_statistic; seem need add ALTER TABLE ad_statistic ADD INDEX( aid , date , action );

Posted by zoid, 10-30-2012, 03:07 PM
This query is not too complex. Are the right indexes in place (on the three columns in the where clause)? Also how many records does the table contain? What table type is it, MyISAM or InnoDB?

Posted by mrzippy, 10-30-2012, 03:27 PM
Hello, The table is MyISAM and has about 10,221,972 rows. (1.2gb in size.) How can I tell if the right indexes are in place? In phpmyadmin for the ad_statistics table, I clicked the "Structure" tab and see this:

Posted by Dr_Michael, 10-30-2012, 03:49 PM
First try to repair the db and then try to optimize it. Both actions can be done from phpmyadmin.

Hjälpte svaret dig?

 Skriv ut denna artikeln

Läs även

Merchant account

Posted by cass, 09-03-2002, 06:00 AMHi, Just joined to get advise on a merchant account for my...

php script security issues

Posted by CleverWebHost, 09-15-2008, 01:12 PMi am on a shared server with php script security...

Adult Hosting

Posted by Nell, 09-03-2002, 02:07 AMI search resellers hosting plan for adult sites. The main...

Whats the best for server with SATA raid 1 and SCSI raid 10

Posted by zefefre, 01-14-2008, 12:42 AMSo I've just got a server with 2xSATA raid 1 (OS, cpanel...

Second slash on production server

Posted by Morecoffee, 03-07-2010, 01:52 PMHello, When I develop PHP scripts on my local server...