是因为版本不对吗,怎么实际查出来不是这个效果
1.select * from eb_user a left join eb_user_behaviour b on a.uid=b.uid where b.active_time=(select MAX(c.active_time) from eb_user_behaviour c where c.uid=a.uid) 用时0.4s不到
2.select a.*,b.active_time from eb_user a left join eb_user_behaviour b on a.uid=b.uid left join eb_user_behaviour c on c.uid=b.uid group by a.uid,b.date,b.active_time having b.active_time=MAX(c.active_time); 用时接近10s
把2里的a.*,b.active_time换成 a.uid,b.date,b.active_time呢?