I am trying to calculate the increase in the size of the database after adding more data. The data I want to add is a list of 512 float values. And there are 750,000 documents in the collection. I'd like to add such a list to each of the documents.
So far, [I have found][1] that MongoDB stores data in BSON files, which can hold 16MB. One float value takes 64 bits. So, 16MB can keep 2,000,000 float values. It is, therefore, impossible to add such a list to each of the documents.
Am I correct in my calculations? Or does it work differently? Thanks in advance for any help!
Document size limit applies to each document in the collection, not to the collection overall.
Separately, MongoDB stores at least the type byte with each value, such that doubles practically take 9 bytes minimum (if they are in an array) + the key name converted to string with a null terminator. See http://bsonspec.org/spec.html.
See also Mongodb 16 MB document example, how much actual data?