- Reference >
mongoShell Methods >- Collection Methods >
- db.collection.dataSize()
db.collection.dataSize()¶
-
db.collection.dataSize()¶ Returns: The size of the collection. This method provides a wrapper around the sizeoutput of thecollStats(i.e.db.collection.stats()) command.