title: In ruby on rails, is it possible to do a sum query with group by using the find_each batching?
body: <p>I'm loading data from my database and I'm doing a sum calculation with a group by. </p>
  
  <pre><code>ElectricityReading.sum(:electricity_value, :group =&gt; "electricity_timestamp", :having =&gt; ["electricity_timestamp = '2010-02-14 23:30:00'"])
  </code></pre>
  
  <p>My data sets are extremely large, 100k upwards so I was wondering if its possible to use the find_each to batch this to help with memory overhead.</p>
  
  <p>I can write the batching manually use limit and offset I guess but I'd like to avoid that if the code already exists.</p>