I have a project, which has 1000 images. From each image, I get 1 million documents that I currently store in a mongoDB collection.
I have 2 alternatives,
1. Create a separate collection for each image, over multiple projects, say 10 projects, and each image(collection) would have 1 million documents that will be indexed. OR
2. Have a single collection and have 1000x1,000,000 documents in one collection, which again will be indexed.
My research and reading suggests that it is not a very good idea to create 1000 collections (for each image) and create an index for each one of 1000, and go with adding a billion documents to a single collection, to which mongoDB caters with no major issue.
My main aim is to enhance performance for reading. There would be no updates and deletes. Only reads and writes. I can afford writes to be slow, but not reads. So am I right in choosing the 2nd alternative?
Any guidance is highly appreciated.