What will be the maximum number of documents we can store in one mongodb collection? I have one million documents with around 100 fields to insert into one collection. So, is it good to use one collection or should I go for multiple collections?
Unless you create a capped collection, there is no limit to the number of documents in a collection.
There is a 16MB limit to the size of a document (use gridfs
in this situation) and limits in the storage engine for the size of the database and data.
If your documents do not exceed 16MB, then having 1 million of them will not be problematic for the mongodb storage engine limits.
Yes. You can store more than a billion. The better your server hardware, the better the MongoDB performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With