occasionally my mysql 4.0.26 server is having slow querry issues which shouldn’t happen (judging by the tuned mem settings and indexes). How can i get more information about the processes that may be locking a particular row - the slow querry log only shows this information:
Query_time: 3 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
UPDATE server SET current_kbytes_used = ‘0’, current_kbytes_free = ‘0’, current_load = ‘0.88’ WHERE SRVID=‘1717’;
The server table has about 2000 rows with an index on SRVID and it is INNODB (so the entire table should not be locked). There are multiple reads and infrequent updates and very rare inserts in this table.
Also, please note that in the majority of operation this query is instantaneous. ex:
UPDATE server SET current_kbytes_used = ‘0’, current_kbytes_free = ‘0’, current_load = ‘0.88’ WHERE SRVID=‘1717’;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
My only guess is if this could happen when the disk is particularly busy at a certain point in time. Can this be found out through logs?
Here is some relevant disk information:
Linux 2.6.9-1.667smp 11/21/2006
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 67.34 489.77 707.73 6227865 8999332
04:10:01 PM CPU %user %nice %system %iowait %idle
04:20:01 PM all 4.26 0.00 1.91 1.25 92.58
04:30:01 PM all 3.23 0.00 1.89 1.25 93.63
Average: all 3.74 0.00 1.90 1.25 93.11