Posted by catch on November 7, 2009 at 4:38am
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | filter.module |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | Performance |
Issue Summary
EXPLAIN SELECT ff.* FROM filter_format ff ORDER BY weight ASC;
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
| 1 | SIMPLE | ff | ALL | NULL | NULL | NULL | NULL | 3 | Using filesort |
+----+-------------+-------+------+---------------+------+---------+------+------+----------------+
1 row in set (0.00 sec)This query is currently run whenever displaying a formatted textarea, but has no index at all.
Comments
#1
#2
subscribing
#3
mysql> EXPLAIN SELECT ff.* FROM filter_format ff ORDER BY weight ASC;+----+-------------+-------+-------+---------------+--------+---------+------+------+-------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+-------+---------------+--------+---------+------+------+-------+
| 1 | SIMPLE | ff | index | NULL | weight | 1 | NULL | 3 | |
+----+-------------+-------+-------+---------------+--------+---------+------+------+-------+
#4
#5
Nice catch. Committed to CVS HEAD. Thanks!
#6
Automatically closed -- issue fixed for 2 weeks with no activity.