I rated Mongo db 3.0 in java and ran into a script when the document size exceeded 16 MB. The scenario is that I have a list of primary keys (unique entries) that should be in the document as an in-built collection with some additional fields. When pk exceeds 16k, we get an error indicating that the document size is exceeded. I know that we can store the collection outside the document instead of pasting it, but since it is required in our script, we have it this way. If we store it outside the document as a separate collection, it works fine, but inserts / updates become very slow, as it should look for all pk and insert / update.
Is there any other way we can do this?
I know that we can use gridfs for this, but since I saw examples, it is mainly used for storing images / videos, etc. in the file system. This, of course, is not how we want to do this.
Any suggestions would be very helpful !!! Thanks at Advance.
source share