db.collection.dataSize(): data size for the collection.
db.collection.storageSize(): allocation size, including unused space.
db.collection.totalSize(): the data size plus the index size.
db.collection.totalIndexSize(): the index size.
PRIMARY> mdb = db.getSiblingDB("myDbName")
PRIMARY> mdb.getCollectionNames().forEach(function(c) { s = mdb[c].stats(); printjson(s)} )
db.collection.storageSize(): allocation size, including unused space.
db.collection.totalSize(): the data size plus the index size.
db.collection.totalIndexSize(): the index size.
PRIMARY> mdb = db.getSiblingDB("myDbName")
PRIMARY> mdb.getCollectionNames().forEach(function(c) { s = mdb[c].stats(); printjson(s)} )
Comments
Post a Comment