mysql> explain SELECT * FROM bot_log WHERE channel REGEXP '.*#drupal-support( |$)' AND (timestamp >= 1219708800 AND timestamp <= 1219795200) ORDER BY id
-> ;
+----+-------------+---------+------+---------------+------+---------+------+---------+-----------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+---------+------+---------------+------+---------+------+---------+-----------------------------+
| 1 | SIMPLE | bot_log | ALL | NULL | NULL | NULL | NULL | 1785642 | Using where; Using filesort |
+----+-------------+---------+------+---------------+------+---------+------+---------+-----------------------------+

Comments

Morbus Iff’s picture

Only a key on id, part of the problem. Needs to have channel and timestamp added.

Morbus Iff’s picture

Status: Active » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.