56,679
社区成员
发帖
与我相关
我的任务
分享
explain SELECT DISTINCT t.* FROM `pre_forum_thread` as t WHERE t.tid > 498405 AND t.readperm='0' AND t.tid NOT IN ('492187','513918') AND t.isgroup='0' AND t.dateline >= '1413771125' AND t.heats>'0' AND t.displayorder>='0' ORDER BY t.heats DESC limit 0,9 ;
+----+-------------+-------+-------+-----------------------+-------+---------+------+--------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+-------+-----------------------+-------+---------+------+--------+-------------+
| 1 | SIMPLE | t | range | PRIMARY,heats,isgroup | heats | 4 | NULL | 374891 | Using where |
+----+-------------+-------+-------+-----------------------+-------+---------+------+--------+-------------+
explain SELECT DISTINCT t.* FROM `pre_forum_thread` as t WHERE t.tid > 498405 AND t.readperm='0' AND t.tid NOT IN ('492187','513918') AND t.isgroup='0' AND t.dateline >= '1413771125' AND t.heats>'0' AND t.displayorder>='0' ORDER BY t.heats DESC ;
+----+-------------+-------+-------+-----------------------+---------+---------+------+-------+-----------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+-------+-----------------------+---------+---------+------+-------+-----------------------------+
| 1 | SIMPLE | t | range | PRIMARY,heats,isgroup | PRIMARY | 3 | NULL | 21462 | Using where; Using filesort |
+----+-------------+-------+-------+-----------------------+---------+---------+------+-------+-----------------------------+
explain SELECT DISTINCT t.* FROM `pre_forum_thread` as t FORCE INDEX (PRIMARY) WHERE t.tid > 498405 AND t.readperm='0' AND t.tid NOT IN ('492187','513918') AND t.isgroup='0' AND t.dateline >= '1413771125' AND t.heats>'0' AND t.displayorder>='0' ORDER BY t.heats DESC limit 0,9 ;
+----+-------------+-------+-------+---------------+---------+---------+------+-------+-----------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+-------+---------------+---------+---------+------+-------+-----------------------------+
| 1 | SIMPLE | t | range | PRIMARY | PRIMARY | 3 | NULL | 21462 | Using where; Using filesort |
+----+-------------+-------+-------+---------------+---------+---------+------+-------+-----------------------------+