Hi guys, I need to load a big amount of records from a table (around 20000). So I am using find_each. In the RDoc it says: "When processing large numbers of records, it‘s often a good idea to do so in batches to prevent memory ballooning." I am not sure I get it though, indeed: 1- If I do: Foo.find_each(:batch_size => 1000) do |lfoo| end RAM use go from 33MB before to 92MB after. 2- Now if I do: temp = Foo.find(:all, :limit => 1000) RAM use go from 33MB before to 35MB after. How come does find_each use so much memory? I must be missing something obvious? I am on Rails 2.3.2. Thanks a lot, Pierre -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.