Blog Post

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 document id.

documentSize

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating