Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10339

The dataSize doc page does not mention the existence of "estimate" parameter

      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

            Assignee:
            kevin.adistambha@mongodb.com Kevin Adistambha
            Reporter:
            kevin.adistambha@mongodb.com Kevin Adistambha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 26 weeks, 4 days ago