Im currently seeding a mongodb cluster for a large scale api. I have over 10 categories of data with 8 subcategories for each category. Assuming i will never have to make a query for more than 1 category at a time would it be better to have 10 databases on the same cluster for each category with their respective subcategories(They all share the same 6 subCategories but may have 1-2 unique subcategories or collections) or would it be better to just have all the categories on 1 database and have them share the default subcategories and have unique subcategories for each. I was also thinking about having different collections for each categories subcategory ex usersX, usersY, usersZ where each is storing the same kind of document but have them separated although i think that just overcomplicates things. Each subCategory collection will have between 20k-150k documents but mainly leaning towards the higher side. What would be the best for performance and scalability? Im sorry in advance if this question is dumb im relatively new to mongoDB just transferring over from SQL for faster read times because that is my main concern. Any feedback is appreciated.
Skip to main content
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
Schema validation in Laravel MongoDB | 0 | 591 | May 2024 |
Improving Query Performance for Conditional Summation in groupby | 6 | 307 | Aug 2024 |
Alternative to using $merge with time series export | 2 | 96 | Oct 2024 |
Looking for help in aggregating user orders data | 12 | 165 | Feb 10 |
$dateTrunc aggregation operator doesn’t return expected value | 3 | 64 | Dec 2024 |