Just a note from a kibitzer: if you include an EXPLAIN, why not use \G so that it is easier to read?
Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com >-----Original Message----- >From: ?? [mailto:tx...@hotmail.com] >Sent: Wednesday, June 02, 2010 6:14 AM >To: mysql@lists.mysql.com >Subject: RE: large table issue > > >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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org