问题
I have 100k documents in an MonoDB Collection, the document({id : '789736363828292'})
has 20k Documents/Records. I would like find the memory utilized by that particular document.
Please help me to find the memory size in MB in MongoDB console.
回答1:
You can use Object.bsonsize
in MongoShell which will return a BSON size (in bytes) of one document. Try
Object.bsonsize(db.col.findOne({id : '789736363828292'}))
来源:https://stackoverflow.com/questions/48960694/how-to-find-the-fhe-size-of-the-specific-document-in-monogodb-collection