DQL: Total Document Content Size By Cabinet

Here is a DQL statement to find the total document size by cabinet. You may be aware that dm_document has two different attributes for content size:

  • r_content_size,
  • r_full_content_size

The first one, r_content_size, can only store sizes upto 2 GB. r_full_content_size stores the correct size if the content is larger than 2 GB. Weird. I know.

select cab.object_name, sum(doc.r_full_content_size) 
from dm_document doc, dm_cabinet cab
where doc.i_cabinet_id = cab.r_object_id
group by cab.object_name



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s