Model.find_each

If you’re recursively looping through all your active record models, using Model.find_each is more efficient than Model.all.each. This incrementally polls the database without requiring the entire result set to load into memory.

Leave a Comment

You must be logged in to post a comment.