How to find the fhe size of the specific Document in MonogoDB Collection?

删除回忆录丶 提交于 2020-01-03 02:21:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!