Post.calculate_avg_time() taking up a long time

My changes affected only the daily query, which operates over posts from the last two days.