Re: Optimize sub query with large group by
Posted by:
Rick James
Date: March 13, 2011 11:32PM
What determines "the most recent person to access any particular object" ? I see no timestamp. Maybe ID, if it is an AUTO_INCREMENT? But there is no ORDER BY.
It sounds like you need what I call the 'group by trick':
http://forums.mysql.com/read.php?10,280124 (limiting rows returned)
http://forums.mysql.com/read.php?10,266585 (How does group by algorithm works?)
http://forums.mysql.com/read.php?10,236805 (Complex Select with Min/Max Syntax)
http://forums.mysql.com/read.php?10,400775 (Assistance required for query with subquery)
http://forums.mysql.com/read.php?10,396680 (Slow Query)
http://forums.mysql.com/read.php?10,394154 (Require help to formulate a query.)
http://forums.mysql.com/read.php?20,389565 (query returns unwanted duplicates)
http://forums.mysql.com/read.php?10,387554 (aggreate data)
http://forums.mysql.com/read.php?10,373984 (select max date in Inner Join)
http://forums.mysql.com/read.php?20,291994 (create function help)
http://forums.mysql.com/read.php?10,290067 (Help with minimum/group by)
http://forums.mysql.com/read.php?10,284734 (max function)
http://forums.mysql.com/read.php?52,272271 (Subquery and JOIN's)
http://forums.mysql.com/read.php?10,250033 (Listing threads by newest posts?)
Subject
Views
Written By
Posted
4410
March 10, 2011 07:44PM
2424
March 13, 2011 03:52PM
2141
March 13, 2011 04:59PM
Re: Optimize sub query with large group by
3111
March 13, 2011 11:32PM
2464
March 14, 2011 02:39AM
1854
March 14, 2011 06:31PM
1759
March 14, 2011 07:15PM
2067
March 15, 2011 04:32AM
1810
March 15, 2011 08:46PM
2563
March 16, 2011 02:02AM
2496
March 16, 2011 08:57AM
1834
March 17, 2011 12:40AM
3867
March 18, 2011 10:58AM
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.