Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> explain select * from game_servers where game_id = 5;
- +----+-------------+-----------------------+------+---------------+---------------+---------+-------+------+-------+
- | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
- +----+-------------+-----------------------+------+---------------+---------------+---------+-------+------+-------+
- | 1 | SIMPLE | game_servers | ref | idx_game_id | idx_game_id | 4 | const | 1 | |
- +----+-------------+-----------------------+------+---------------+---------------+---------+-------+------+-------+
- 1 row in set (0.00 sec)
- mysql> explain select * from games inner join game_servers on games.id = game_servers.game_id;
- +----+-------------+-----------------------+--------+---------------+---------+---------+--------------------------------------------+------+-------------+
- | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
- +----+-------------+-----------------------+--------+---------------+---------+---------+--------------------------------------------+------+-------------+
- | 1 | SIMPLE | game_servers | ALL | idx_game_id | NULL | NULL | NULL | 61 | |
- | 1 | SIMPLE | games | eq_ref | PRIMARY | PRIMARY | 4 | htest.game_servers.game_id | 1 | Using where |
- +----+-------------+-----------------------+--------+---------------+---------+---------+--------------------------------------------+------+-------------+
- 2 rows in set (0.00 sec)
- mysql>
Advertisement
Add Comment
Please, Sign In to add comment