There is post on stackoverflow in which it is mentioned that BSON size limit is upto 4MB or 8MB. Well for my application the JSON documents would be hardly few tens of kilobytes or even less. Is mongodb suitable for my application if my document size is so less. What I actually want to ask is, do mongodb set aside 4 MB or 8 MB of space for every document so as to improve quick lookups. Well the question might sound stupid, but can anyone tell is it suitable for my application or not.
Share
No, smaller documents are perfectly fine. There is no space left aside to make a document fit into mega-byte-sized chunks.
MongoDB will leave a little bit of padding to allow for documents to allow for in-place updates even when documents grow, but that is not very much. Other than that, the on-disk space requirement for the document is just the BSON size of the data itself.