Why to use find_each instead of all in Ruby on Rails
In Ruby on Rails, there are two main methods for retrieving all records from a model: all
and find_each
. Both methods return an ActiveRecord::Relation
, but they have different performance characteristics.