MySQL Forums
Forum List  »  MyISAM

Re: Slow Updates , High CPU 100%
Posted by: Rick James
Date: October 01, 2010 08:55AM

Not normal.

Possible problem... If a SELECT is taking 0.5s and it started just before the UPDATE started, then the UPDATE will wait because it needs a write lock on that MyISAM table.

Set long_query_time = 0.5 (if you version is new enough to allow floating values; else set it to 1).

Suggest you do SHOW PROCESSLIST frequently. Look for any queries (including SELECT) taking more than a second, any queries running when the UPDATE says "Locked", and any queries that show up frequently.

All it would take is some SELECT doing a table scan to both peg the CPU and block the UPDATE. Perhaps all it will take to fix the problem is an INDEX to make the naughty SELECT run fast.

Switching to InnoDB might or might not help. UPDATE and SELECT can run simultaneously, but perhaps not if the SELECT is doing a table scan.

Options: ReplyQuote


Subject
Views
Written By
Posted
5083
September 30, 2010 04:15AM
Re: Slow Updates , High CPU 100%
3117
October 01, 2010 08:55AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.