-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:
-
Environment:
*Location*: https://docs.mongodb.com/manual/reference/command/dataSize/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
*Referrer*: https://docs.mongodb.com/v2.2/reference/command/dataSize/
*Screen Resolution*: 1440 x 900
*Location*: https://docs.mongodb.com/manual/reference/command/dataSize/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 *Referrer*: https://docs.mongodb.com/v2.2/reference/command/dataSize/ *Screen Resolution*: 1440 x 900
The dataSize doc page mentions that the parameters into the command are the namespace, keypattern, min, and max. However, there is also an "estimate" boolean value parameter for the command that is not mentioned in the docs.
The dataSize command determines the total size of a range of documents, specified by its index key. The estimate parameter attempts to provide an estimated size instead, by walking the index and assuming the documents are uniformly sized (based on the average document size in the collection) instead of fetching the documents and calculating their actual size.
Relevant code for the estimate parameter in MongoDB 3.4: https://github.com/mongodb/mongo/blob/v3.4/src/mongo/db/commands/dbcommands.cpp#L859-L863
Relevant code for what the parameter does in MongoDB 3.4: https://github.com/mongodb/mongo/blob/v3.4/src/mongo/db/commands/dbcommands.cpp#L935-L936
- documents
-
SERVER-1545 make single command for size and median
- Closed