MySQL Forums
Forum List  »  Newbie

Re: Group-wise Maximum performance
Posted by: Jon Richards
Date: May 03, 2005 02:13PM

From the query:

explain SELECT data from storm s1 where time=(select max(s2.time) from storm s2 where s1.name = s2.name);

with 360 updates to 20 objects with the same name gives:

"id","select_type","table","type","possible_keys","key","key_len","ref","rows","Extra"
1,"PRIMARY","s1","ALL","","",(null),"",6973,"Using where"
2,"DEPENDENT SUBQUERY","s2","ref","PRIMARY","PRIMARY",255,"storm.s1.name",1,"Using index"

Options: ReplyQuote




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.