Re: CPU usage 99% - and query very slow - help
I see your slow log contains a lot of queries with predicates like "search_name LIKE '%Kaspersky%'". Note that the LIKE operator can only use indexes when searching for prefixes of strings. Hence, when searching for strings starting with '%', normal indexes will not be used.
I see you have full text indexes defined. However, in order to use them, you need to use the MATCH function. That is, instead of the LIKE-expression above, you should write something like "MATCH(search_name) AGAINST ('Kaspersky')".
Fult text indexing for InnoDB will be available in the upcoming MySQL 5.6 release.
HTH,
Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway
Subject
Views
Written By
Posted
5192
August 03, 2012 10:49AM
2064
August 04, 2012 01:36PM
2820
August 06, 2012 01:04PM
Re: CPU usage 99% - and query very slow - help
2215
August 15, 2012 03:09AM
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.