RE: large table issue

2010-06-02 Thread
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 -> ; ++-+---+++---

large table issue

2010-06-02 Thread
Hi all, do you guys know how to deal with the large tables? here's my problem: I have two web servers( running Nginx ) , two DB servers( running MySQL 5.1.35 ) and a server for load balancing. What I'm maintaining is a game data tracking system. There's a game_log table which will record al

RE: how to get the name of primary key ?

2010-02-01 Thread
hi Jesper, thanks a lot! That's what I want. thank u againCC: mysql@lists.mysql.com From: jes...@noggin.com.au Subject: Re: how to get the name of primary key ? Date: Mon, 1 Feb 2010 20:26:36 +1100 To: tx...@hotmail.com On 01/02/2010, at 7:33 PM, 曹凯 wrote: Hi all, if we just know the

RE: how to get the name of primary key ?

2010-02-01 Thread
> From: theyaho...@gmail.com > To: tx...@hotmail.com > CC: mysql@lists.mysql.com > > Hi, > > Use > > *SELECT * FROM game_log WHERE this_table's_PK = last_insert_id()* > > It will help you. > > Regards, > Thiyaghu CK, > MySQL DBA > www.mafiree.com &

how to get the name of primary key ?

2010-02-01 Thread
Hi all, if we just know the table name but don't know the name of primary key, is there any variables or constants could instead of the PK? for example: there is a table "game_log", and now I have the last inserted_id but don't know what its primary_id is, how can I "SELECT * FROM game_log W