Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.82 KB | None | 0 0
  1. mysql> explain SELECT i.*, u.*, i.id as id, SUM(v.vote) as vote FROM tentego_img i LEFT JOIN tablicacms_users u ON i.owner = u.id LEFT JOIN tentego_img_vote v ON i.id = v.object_id WHERE i.is_waiting = 0 GROUP BY i.id ORDER BY i.rel_date DESC, i.date DESC LIMIT 0,10;
  2. +----+-------------+-------+--------+-----------------------------------------------------------------+----------------+---------+------------------+-------+-----------------------------------------------------------------+
  3. | id | select_type | table | type   | possible_keys                                                   | key            | key_len | ref              | rows  | Extra                                                           |
  4. +----+-------------+-------+--------+-----------------------------------------------------------------+----------------+---------+------------------+-------+-----------------------------------------------------------------+
  5. |  1 | SIMPLE      | i     | ref    | PRIMARY,is_waiting,is_waiting_rel_date,is_waiting_rel_date_date | is_waiting     | 4       | const            | 18917 | Using temporary; Using filesort                                 |
  6. |  1 | SIMPLE      | u     | eq_ref | PRIMARY                                                         | PRIMARY        | 4       | repostuj.i.owner |     1 | NULL                                                            |
  7. |  1 | SIMPLE      | v     | index  | NULL                                                            | vote_object_id | 8       | NULL             |  3829 | Using where; Using index; Using join buffer (Block Nested Loop) |
  8. +----+-------------+-------+--------+-----------------------------------------------------------------+----------------+---------+------------------+-------+-----------------------------------------------------------------+
  9. 3 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement