title: ActiveRecord: Alternative to find_in_batches?
body: <p>I have a query that loads thousands of objects and I want to tame it by using <code>find_in_batches</code>:</p>
  
  <p><code>Car.includes(:member).where(:engine =&gt; "123").find_in_batches(batch_size: 500) ...</code></p>
  
  <p>According to the docs, I can't have a custom sorting order: <a href="http://www.rubydoc.info/docs/rails/4.0.0/ActiveRecord/Batches:find_in_batches" rel="nofollow">http://www.rubydoc.info/docs/rails/4.0.0/ActiveRecord/Batches:find_in_batches</a></p>
  
  <p>However, I need a custom sort order of <code>created_at DESC</code>. Is there another method to run this query in chunks like it does in find_in_batches so that not so many objects live on the heap at once?</p>