Answer the question
In order to leave comments, you need to log in
How to properly organize work with documents in MongoDB?
I scrape several sites every 5 seconds (PhantomJS), filter the results and put them into documents (PHP). The document looks something like this:
{
"_id" : ObjectId("578e68cb438ca09f7f02e21a"),
"key" {
"Team1" : "Blue",
"Team2" : "Red",
"Archive": false,
"1469026428" : {
"Win1" : 1.67,
"Draw" : 2.07,
"Win2" : null
}
}
}
Answer the question
In order to leave comments, you need to log in
If you don't need to output archived and simple ones together (in one request), then it's better to transfer them to another collection - you can save a lot on indexes (+ better read, write speed), archived ones can be moved to a slow, cheap server, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question