Answer the question
In order to leave comments, you need to log in
What is the best way to implement the mongodb structure?
Hello, such a question: "For example, I have 1.000.000 users on the service. And every day the total number of messages reaches 1.000.000. What is the best way to implement the database structure:
1) When registering a user, automatically create a collection for him?
2) Store all messages (in a year there will be about half a billion of them) in one collection, for example messages"?
Answer the question
In order to leave comments, you need to log in
In one, of course, do not invent tricks, read the monga documentation section about data modeling https://docs.mongodb.org/v3.0/core/data-modeling-i... and create indexes. So it will be much more convenient to work with data, search for it, backup and manipulate it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question