Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58508

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL

    Description

      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") }
      })

      Attachments

        Activity

          People

            edwin.zhou@mongodb.com Edwin Zhou
            kek.forums@gmail.com Petr Novak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: