The "dataSize" command does not calculate/include the records matching specified bounds

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I tried to use https://docs.mongodb.com/manual/reference/command/dataSize/#mongodb-dbcommand-dbcmd.dataSize  command to obtain exact size of database records mathing the specified key-range, like:

       

      db.runCommand({ 
         dataSize: "mydb.mycollection", 
         keyPattern: { "_id": 1 }, 
         min: { "_id": new ObjectId("606ded0a249ef5c340ea248e") }, 
         max: { "_id": new ObjectId("606ded0a249ef5c340ea248e") }
      })

            Assignee:
            Edwin Zhou
            Reporter:
            Petr C
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: