16MB limit explained

Greetings,
Please help me understand
The limitation is for document.
What if i have document inside the document


{
   "_id": "joe",
   "addresses": 
                {
                  "file": "16MB"

                }
 }

Do i understand that if the file will be 16MB lets say, that i cant not insert more emded documents inside the addresses?

Hello @Ukro_Ukrovic, the 16 MB limit is for the entire document - includes all fields of any data type (arrays, sub-documents (objects or embedded documents), strings, binary data, etc.).

In the above document, the field addresses is of type sub-document, and it is considered as part of the main document.

You can check the size of a document using the $bsonsize aggregate operator.

3 Likes

thank you for info )

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.