MySQL Forums
Forum List  »  Performance

Re: MySQL High CPU Usage
Posted by: Rick James
Date: January 03, 2014 11:11AM

> We hae indexed all the neccessary fields.

Common Newbie errors (in indexing):
* Indexing every field.
* Not knowing that a "compound index" is often better than two separate indexes.
* Not knowing that MySQL rarely uses two indexes in one SELECT.
* Not understanding the benefits of "clustering".
* Mixing datatypes or collation between fields used in a JOIN.

SHOW STATUS LIKE 'Max_used_connections'; -- this will investigate whether you have a lot of connections at once.

Turn on the slowlog, with long_query_time=1; see if anything shows up in it.

If you have a graph of the "load average", please present it.

Options: ReplyQuote


Subject
Views
Written By
Posted
7412
January 02, 2014 04:33AM
2926
January 02, 2014 08:02AM
2570
January 03, 2014 12:58AM
2423
January 07, 2014 05:23AM
2147
January 07, 2014 06:55PM
1739
January 08, 2014 04:21AM
1572
January 02, 2014 01:26PM
1616
January 03, 2014 01:05AM
Re: MySQL High CPU Usage
1625
January 03, 2014 11:11AM
1844
January 07, 2014 05:21AM


Sorry, you can't reply to this topic. It has been closed.

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.