SELECT MAX(id) FROM history
WHERE account_id = 216 GROUP BY asset_id
...works. Returns, e.g.: 1234, 3456, 5483, 8382.
SELECT history.* FROM history
WHERE history.id IN (1234, 3456, 5483, 8382 )
...works too. But if I try to combine them using a subquery, a la...
SELECT history.* FROM history
WHERE history.id IN ( SELECT MAX(id) FROM history WHERE account_id =
216 GROUP BY asset_id )
...it pretty much hangs MySQL. CPU goes to 100%, ten minutes later, I
have to kill the connection. I can't figure out why. Any ideas? Any
suggestions?
...Rene
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]