# CouchDB Snippet: Find the Biggest Object

Published: 2010-07-31T11:00:00.000-04:00
Updated: 2013-12-15T21:32:18.000-05:00
Canonical: https://www.voodootikigod.com/couchdb-snippet-find-the-biggest-object

> I use Apache CouchDB [http://couchdb.apache.org/] in the implementation of OurParents [http://www.ourparents.com] for holding a lot of our big data. One of the things I run into is a concern for the size of any specific object within the dataset. When you have hundreds of thousands of documents eac...

---

I use [Apache CouchDB](http://couchdb.apache.org/?ref=voodootikigod.com) in the implementation of [OurParents](http://www.ourparents.com/?ref=voodootikigod.com) for holding a lot of our big data. One of the things I run into is a concern for the size of any specific object within the dataset. When you have hundreds of thousands of documents each of which with a lot of weight, finding the “big” objects can be a problem. Luckily, and full thanks to [Jan Lehnardt](http://jan.prima.de/?ref=voodootikigod.com), there is this little gem that leverages the underlying SpiderMonkey system within CouchDB to determine the size of a document based on the number of characters in it. Hope it helps you as much as it helps me:

**Map:**
