Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- +----+-------------+-------+--------+-----------------------------------------------------------------+----------------+---------+------------------+-------+-----------------------------------------------------------------+
- | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
- +----+-------------+-------+--------+-----------------------------------------------------------------+----------------+---------+------------------+-------+-----------------------------------------------------------------+
- | 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 |
- | 1 | SIMPLE | u | eq_ref | PRIMARY | PRIMARY | 4 | repostuj.i.owner | 1 | NULL |
- | 1 | SIMPLE | v | index | NULL | vote_object_id | 8 | NULL | 3829 | Using where; Using index; Using join buffer (Block Nested Loop) |
- +----+-------------+-------+--------+-----------------------------------------------------------------+----------------+---------+------------------+-------+-----------------------------------------------------------------+
- 3 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement