Guest User

asd

a guest
Apr 28th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. mysql> explain select * from game_servers where game_id = 5;
  2. +----+-------------+-----------------------+------+---------------+---------------+---------+-------+------+-------+
  3. | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
  4. +----+-------------+-----------------------+------+---------------+---------------+---------+-------+------+-------+
  5. | 1 | SIMPLE | game_servers | ref | idx_game_id | idx_game_id | 4 | const | 1 | |
  6. +----+-------------+-----------------------+------+---------------+---------------+---------+-------+------+-------+
  7. 1 row in set (0.00 sec)
  8.  
  9. mysql> explain select * from games inner join game_servers on games.id = game_servers.game_id;
  10. +----+-------------+-----------------------+--------+---------------+---------+---------+--------------------------------------------+------+-------------+
  11. | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
  12. +----+-------------+-----------------------+--------+---------------+---------+---------+--------------------------------------------+------+-------------+
  13. | 1 | SIMPLE | game_servers | ALL | idx_game_id | NULL | NULL | NULL | 61 | |
  14. | 1 | SIMPLE | games | eq_ref | PRIMARY | PRIMARY | 4 | htest.game_servers.game_id | 1 | Using where |
  15. +----+-------------+-----------------------+--------+---------------+---------+---------+--------------------------------------------+------+-------------+
  16. 2 rows in set (0.00 sec)
  17.  
  18. mysql>
Advertisement
Add Comment
Please, Sign In to add comment