Monthly Archives: April 2016

MongoDB -Calculating Collection Size

Calculating Collection Size We can get the size of a collections by using the shell’s functions db.collection.dataSize() : Returns data size in bytes for the collection. db.collection.storageSize() : Returns allocation size in bytes, including unused space. db.collection.totalSize() : Returns the data size plus … Continue reading

Posted in MongoDB | Tagged , , , , | Leave a comment

MongoDB – Calculating Document Size

We can get the size of a document is by using the shell’s Object.bsonsize() function. We pass the object_id of the document to get the size For example in the foo collection, we can find the size of the document using any … Continue reading

Posted in MongoDB | Tagged | Leave a comment