MySQL Forums
Forum List  »  General

Re: Query takes time to execute
Posted by: Alok Singh
Date: October 08, 2004 02:59AM

Thanks for the suggestions
My Table structure is:

CREATE TABLE game_result (
id bigint NOT NULL auto_increment,
game_id bigint NOT NULL default '0',
player_id int default NULL,
amount int default NULL,
ip varchar(16) default NULL,
guid varchar(255) default NULL,
date timestamp(14) NOT NULL,

Result of EXPLAIN query:

| table game_result
| type ALL
| possible_keys NULL
| key NULL
| key_len NULL
| ref NULL
| rows 5697784
| Extra where used; Using temporary; Using filesort

I create date index and still it takes 5-10 seconds when i fire the query for 1 MONTH
Also, I create composite index (date,player_id, amount), it reduced the time by 1/2-1 seconds

Tell me if any other solutions you have....

Options: ReplyQuote

Written By
October 07, 2004 03:15AM
October 08, 2004 01:17AM
Re: Query takes time to execute
October 08, 2004 02:59AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.