- Reference >
mongo
Shell Methods >- Collection Methods >
- db.collection.stats()
db.collection.stats()¶
On this page
Definition¶
-
db.collection.
stats
(scale)¶ Returns statistics about the collection. The method includes the following parameter:
Parameter Type Description scale
number Optional. The scale used in the output to display the sizes of items. By default, output displays sizes in bytes. To display kilobytes rather than bytes, specify a scale
value of1024
.Returns: A document that contains statistics on the specified collection. The
stats()
method provides a wrapper around the database commandcollStats
.