2

Why I have so many queries when I using 'show processlist ' show processlist;

And my CPU is 600+% used

enter image description here

Is there anything i can do to improve mysql performance? Thanks

1 Answer 1

7

Yes, you can change your storage engine from MyISAM to InnoDB - MyISAM only knows table level locking (when it writes to a record, it blocks the whole table), while InnoDB knows row level locking (it locks just the row you are writing to)

4
  • But Myisam performance is better than innodb when have many queries Jul 1, 2011 at 4:48
  • 3
    @ShunnarMeng First, no, not necessarily. It depends in part on what types of queries, not just how many. Second, do you know MyISAM is better because you've tested it in your scenario or because you read the conclusions of some benchmark somewhere? MyISAM is certainly faster sometimes, but it will vary for each situation.
    – Wiseguy
    Jul 1, 2011 at 4:54
  • 3
    In my opinion MyISAM has very few (disputable) pluses over InnoDB and many minuses - in fact, it has so little pluses , that I always prefer InnoDB Jul 1, 2011 at 5:01
  • 1
    I agree. Changing the default from MyISAM to InnoDB was a good move by MySQL, IMO. Admittedly, my use of MyISAM is fairly rare. When I do, it's only a few MyISAM tables for specific purposes among mostly InnoDB tables for all other uses.
    – Wiseguy
    Jul 1, 2011 at 5:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.