Saturday, July 13, 2013

CouchBase : Calculating average document size of documents stored in Couchbase

Couchbase offers an unique NoSQL database combining integrated cache and storage technology. Many customers and prospects are using it to store binary data and/or JSON documents. Often; it is necessary to determine average document size to be able to properly size a production system. See this great set of blogs from Perry to learn more about Couchbase sizing:

This blog entry details a simple way to calculate average document size (for binary data and JSON documents) using views.

This is meant to be used in a development or staging system only and not in a real production system as this will create overhead while indexing every document.

Views are functions that you write in Javascript and which allow to extract, filter, aggregate and find information for documents stored in Couchbase server. First step in creating a view is to provide a map function which will filter entries for certain information and extract some of the information. The result of a map function is an ordered list of key/value pairs, called an index. The results of map functions are persisted on to disk by Couchbase server and will be updated incrementally as documents change.

Read more here

Leave a Reply

All Tech News IN © 2011 & Main Blogger .