All pastes #2083222 Raw Edit

Someone

public text v1 · immutable
#2083222 ·published 2011-09-27 08:06 UTC
rendered paste body
mysql> explain SELECT post.postid, post.pagetext, post.dateline AS date, thread.forumid, thread.title as thread_title, thread.threadid, forum.forumid, forum.title as forum_title                FROM post as post                LEFT JOIN thread as thread on (post.threadid = thread.threadid)                LEFT JOIN forum as forum on (thread.forumid = forum.forumid)                WHERE thread.forumid NOT IN(69,114,108,143,148,95,111,144,3,38,146,109,152,41,39,112,42,43,40,46,45,44,36,37,115,139,140,145,147,154,155,153,69,114,109,40,115,153) AND forum.forumid NOT IN(69,114,108,143,148,95,111,144,3,38,146,109,152,41,39,112,42,43,40,46,45,44,36,37,115,139,140,145,147,154,155,153,69,114,109,40,115,153)                ORDER BY postid DESC                LIMIT 1;
+----+-------------+--------+--------+-------------------------------------+----------+---------+-------------------------+--------+----------------------------------------------+
| id | select_type | table  | type   | possible_keys                       | key      | key_len | ref                     | rows   | Extra                                        |
+----+-------------+--------+--------+-------------------------------------+----------+---------+-------------------------+--------+----------------------------------------------+
|  1 | SIMPLE      | thread | range  | PRIMARY,forumid,forumid_2,forumid_3 | forumid  | 2       | NULL                    | 168018 | Using where; Using temporary; Using filesort |
|  1 | SIMPLE      | forum  | eq_ref | PRIMARY                             | PRIMARY  | 2       | forum_h.thread.forumid  |      1 | Using where                                  |
|  1 | SIMPLE      | post   | ref    | threadid                            | threadid | 4       | forum_h.thread.threadid |      8 |                                              |
+----+-------------+--------+--------+-------------------------------------+----------+---------+-------------------------+--------+----------------------------------------------+
3 rows in set (0.00 sec)