-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:
*Location*: https://docs.mongodb.com/manual/reference/command/dbStats/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
*Referrer*: https://docs.mongodb.com/manual/reference/method/db.stats/
*Screen Resolution*: 1920 x 1080
*Location*: https://docs.mongodb.com/manual/reference/command/dbStats/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36 *Referrer*: https://docs.mongodb.com/manual/reference/method/db.stats/ *Screen Resolution*: 1920 x 1080
-
0.25
Think the documentation would be clearer if it explained that "storageSize" is the size of the file on disk. dataSize is the size of the uncompressed documents inside the collection. So in many cases dataSize can be larger than storageSize, This is counterintuitive.
An example would help. Here e.g. create a db (db.stats = 0). Insert a single record (db.stats jumped up as storage is allocated). Now remove that record. storageSize is unchanged but dataSize goes back to 0.