# Finding the size of ActiveRecord objects

**URL:** <https://www.ruby-forum.com/t/finding-the-size-of-activerecord-objects/154372>\
**Category:** Rails\
**Created:** [November 28, 2008, 11:57am UTC](https://www.ruby-forum.com/t/finding-the-size-of-activerecord-objects/154372 "2008-11-28T11:57:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.ruby-forum.com/u/adam)\
**Post date:** [November 28, 2008, 11:57am UTC](https://www.ruby-forum.com/t/finding-the-size-of-activerecord-objects/154372/1 "2008-11-28T11:57:24Z")

</div>

Hi all,

Is there a way to find the size of an ActiveRecord object on the disk?  
The idea is that a user has a certain amount of disk space allocated  
to them and they can create various objects until they run out of  
space. Is this possible?

Many thanks,  
Adam

---

<div class="post-metadata">

**Author:** ![adam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4af34b/32.png) [@adam](https://www.ruby-forum.com/u/adam)\
**Post date:** [November 28, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/finding-the-size-of-activerecord-objects/154372/2 "2008-11-28T12:33:49Z")

</div>

On Nov 28, 10:56 am, Adam [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all,
> 
> Is there a way to find the size of an ActiveRecord object on the disk?  
> The idea is that a user has a certain amount of disk space allocated  
> to them and they can create various objects until they run out of  
> space. Is this possible?

Sounds like a lot of this will depend on how the database stores the  
rows (eg how long are numerical columns etc…, are rows packed  
etc…)

Fred
