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

storage size calculate for a document

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Internal Code
    • None

    Description

      I am trying to understand how the document size is calculated in Mongodb. For this i created 3 documents as shown below. Each of them is created in separate collections. 

      How is the size of the documents ( 2nd and 3rd ) get the values 33 and 31 respectively.

      { "_id" : ObjectId("5b6ca3eceee26d4a1ba7df64") }

      – size = 22

      { "_id" : ObjectId("5b6ca5ddeee26d4a1ba7df66"), "c" : 1 }

      – size = 33

      { "_id" : ObjectId("5b6ca642eee26d4a1ba7df67"), "c" : "a" }

      – size = 31

       

      This will help me to do some size estimation as we are trying to migrate from SQL Server to MongoDB

       

      Attachments

        Activity

          People

            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            mkg Manoj George
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: