Simple MySQL queries taking long time to compute
问题 I am just learning MySQL and I have a problem. Sometimes for various queries MySQL starts calculating at 100% CPU usage for 15-20 seconds and than it returns the result normally saying: Query took 0.1780 sec. It happens on very simple queries. For example this query took 0.36 seconds. (SELECT DISTINCT a1.actor FROM actors AS a1, actors AS a2 WHERE a1.title = a2.title AND a1.YEAR = a2.YEAR AND a1.actor = a2.actor AND a1.character_name <> a2.character_name) The listing of the table (7000 rows)