查询占用了太多时间(4秒),我可以优化此查询吗?我只想计算平均值,我的查询是
SELECT r.soiling_percentage_per_hour, rf.rain_mm, AVG( r.soiling_percentage_per_hour )
AS av_soil_factor
FROM `report` AS r
INNER JOIN `rain_forcast` AS rf ON ( r.day = rf.datetime )
GROUP BY rf.rain_mm
LIMIT 0 , 30
可能有10000条记录,目前我已经给出了限制,但它不会影响执行。时间