MySQL Forums
Forum List  »  General

Query takes time to execute
Posted by: Alok Singh
Date: October 07, 2004 03:15AM

Hi,
I am running following query in a JSP page...
My table contains 1,35,70,941 Records. (with 4 numeric fields)
SELECT player_id, sum(amount) as winnings
FROM game_result
WHERE date >= SUBDATE(NOW(), INTERVAL 1 DAY) AND player_id<>0
GROUP BY player_id
HAVING winnings > 0
ORDER BY winnings DESC LIMIT 10

It takes almost 40-45 seconds to execute. and takes 1 min to reflect in a jsp page.
I want some optimal solution for that, so that I can get the oage within 5-10 seconds

It is very urgent
my email id is
asp_ab@yahoo.com

Alok

Options: ReplyQuote


Subject
Written By
Posted
Query takes time to execute
October 07, 2004 03:15AM
October 08, 2004 01:17AM
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.