- Reference >
- Database Commands >
- collStats
collStats¶
-
collStats
¶ The
collStats
command returns a variety of storage statistics for a given collection. Use the following syntax:Specify the
collection
you want statistics for, and use thescale
argument 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 themongo
shell.Note
The scale factor rounds values to whole numbers. This can produce unpredictable and unexpected results in some situations.
See also