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.
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.
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'}))