imthegrv
imthegrv

Reputation: 409

Size limit for mongo DB collection , documents and database

I have been learning and working on MongoDB for the last few months, now I am really confused about the maximum size limit of 16 MB per document. I just want to know that, is this 16 MB size limit applies to a single document inside the collection or this limit also applies to a single collection.

As I have a collection with hotel schema, where I will be adding more than 5,00,000 documents as hotel information.

I tried to find out the maximum limit per collection, but I didn't find some information. I really would appreciate some highlights here.

Upvotes: 2

Views: 7935

Answers (1)

Spyros K
Spyros K

Reputation: 2605

Currently, that is until V5.0 of MongoDB, 16MB is the size limit of a single bson document in MongoDB.

The number of documents per collection is unlimited but if needed a limit can be manually set.

If larger documents or files need to be stored, MongoDB offers the GridFS mechanism that can support larger files.

Upvotes: 5

Related Questions