# Find :all and RAM memory

**URL:** <https://www.ruby-forum.com/t/find-all-and-ram-memory/148288>\
**Category:** Rails\
**Created:** [September 11, 2008, 10:36am UTC](https://www.ruby-forum.com/t/find-all-and-ram-memory/148288 "2008-09-11T10:36:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@Abel](https://www.ruby-forum.com/u/Abel)\
**Post date:** [September 11, 2008, 10:36am UTC](https://www.ruby-forum.com/t/find-all-and-ram-memory/148288/1 "2008-09-11T10:36:22Z")

</div>

Say you have a table with a very high number or entries and you  
perform a search that would bring out a lot of results like this:

a = Ad.find :all

My question is how is this stored in memory? can this crash your  
server or freeze it or is it safe to use in production?

---

<div class="post-metadata">

**Author:** ![Abel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/2acd7d/32.png) [@Abel](https://www.ruby-forum.com/u/Abel)\
**Post date:** [September 11, 2008, 10:51am UTC](https://www.ruby-forum.com/t/find-all-and-ram-memory/148288/2 "2008-09-11T10:51:37Z")

</div>

On Sep 11, 9:35 am, Abel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Say you have a table with a very high number or entries and you  
> perform a search that would bring out a lot of results like this:
> 
> a = Ad.find :all
> 
> My question is how is this stored in memory? can this crash your  
> server or freeze it or is it safe to use in production?

Nothing magic is happening so this could quite conceivably cause the  
ruby process to run out of memory.

Fred
