Hi All,
I have a query which takes approximately 0.5 seconds to execute , it is as
follows
SELECT gamename, MAX(score) AS score, COUNT(valid=1) AS played FROM
gamesessions AS gamesessions
WHERE valid=1 AND sessiontype IN (1,2)
GROUP BY gamename;
EXPLAIN SELECT gives me this, also there is an index on the columns valid
and sessiontype
id select_type table type possible_keys key key_len ref rows Extra 1
SIMPLE gamesessions ref valid_sess valid_sess 1 const 55003 Using where;
Using temporary; Using filesort
Can this be optimized to run faster
Appreciate your time ....
Kishore Jalleda