[SERVER-36596] storage size calculate for a document Created: 10/Aug/18  Updated: 04/Sep/18  Resolved: 10/Aug/18

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Manoj George Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 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

 



 Comments   
Comment by Ramon Fernandez Marina [ 10/Aug/18 ]

Thanks for your report mkg. Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources.

Regards,
Ramón.

Generated at Thu Feb 08 04:43:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.