发布于 2015-09-14 15:07:17 | 101 次阅读 | 评论: 0 | 来源: 网络整理
For internal use.
The dataSize command returns the size data size for a set of data within a certain range:
{ dataSize: "database.collection", keyPattern: { field: 1 }, min: { field: 10 }, max: { field: 100 } }
This will return a document that contains the size of all matching documents. Replace database.collection value with database and collection from your deployment. The keyPattern, min, and max parameters are options.
The amount of time required to return dataSize depends on the amount of data in the collection.