hi huys,

here's the explain of a query on this table

EXPLAIN SELECT COUNT(game_log_id) AS sum2 FROM game_log AS g, player AS p WHERE 
g.player_id = p.player_id AND  g.game_id=p.game_id=27 AND p.type=1 AND 
g.event_id = 32
    -> ;
+----+-------------+-------+--------+--------------------+----------+---------+----------------------------+--------+-------------+
| id | select_type | table | type   | possible_keys      | key      | key_len | 
ref                        | rows   | Extra       |
+----+-------------+-------+--------+--------------------+----------+---------+----------------------------+--------+-------------+
|  1 | SIMPLE      | g     | ref    | event_id,player_id | event_id | 4       | 
const                      | 237894 |             |
|  1 | SIMPLE      | p     | eq_ref | PRIMARY            | PRIMARY  | 4       | 
trigger_replay.g.player_id |      1 | Using where |
+----+-------------+-------+--------+--------------------+----------+---------+----------------------------+--------+-------------+
2 rows in set (0.00 sec)

and,  index on 'game_id', 'event_id', 'player_id'

CK
                                          
_________________________________________________________________
想知道明天天气如何?必应告诉你!
http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2

Reply via email to