Answer the question
In order to leave comments, you need to log in
Query in mongodb (join how to be)?
Good afternoon!
There is a collection of users (id, user, city) and a collection of user logs (id, uid, log).
How to select logs specific user filtered by city. Joinnov, as I understand it, is not in mongo. You can of course select users first and then select logs. but in php you don't want to keep an array of 2000 elements in memory. How to do it at the base level?
Answer the question
In order to leave comments, you need to log in
In general, if you have such a situation, then your database is incorrectly designed.
It is possible to form a collection-aggregate through map/reduce and pull it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question