Topic: extremely slow search query
mysql> SELECT m.post_id FROM search_words AS w INNER JOIN search_matches AS m ON m.word_id = w.id WHERE w.word LIKE '%vadgadgag%';
Empty set (39.52 sec)
mysql> explain SELECT m.post_id FROM search_words AS w INNER JOIN search_matches AS m ON m.word_id = w.id WHERE w.word LIKE '%vadgadgag%';
+----+-------------+-------+------+----------------------------+---------------------+---------+-----------------+---------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+----------------------------+---------------------+---------+-----------------+---------+-------------+
| 1 | SIMPLE | m | ALL | search_matches_word_id_idx | NULL | NULL | NULL | 2190300 | |
| 1 | SIMPLE | w | ref | search_words_id_idx | search_words_id_idx | 3 | forum.m.word_id | 1 | Using where |
+----+-------------+-------+------+----------------------------+---------------------+---------+-----------------+---------+-------------+
Its the same with only one % ... should it be this slow? The server is fast, with a lot of memory and a proper my.cnf (well, it should be anyway).