- Reference >
- Database Commands >
- collStats
collStats¶
-
collStats¶ The
collStatscommand returns a variety of storage statistics for a given collection. Use the following syntax:Specify the
collectionyou want statistics for, and use thescaleargument to scale the output. The above example will display values in kilobytes.Examine the following example output, which uses the
db.collection.stats()helper in themongoshell.Note
The scale factor rounds values to whole numbers. This can produce unpredictable and unexpected results in some situations.
See also