Skip to main content
4 events
when toggle format what by license comment
Aug 26, 2020 at 9:54 comment added Leos Literak I am getting data from 5 different collections. I see your point now - I can get the count for all users at once. This will be more efficient than the current solution where I call this count within a loop for each user separately. I need to think about behaviour when there will be tens of thousands of users and I need five such result sets.
Aug 26, 2020 at 9:26 comment added domenikk What do you mean unrelated? You are getting every user and then getting the poll_votes for each of them in a loop; my suggestion is a single query that gets the poll_votes for every user.
Aug 25, 2020 at 21:00 comment added Leos Literak I use the aggregation but these collections are unrelated.
Aug 25, 2020 at 18:46 history answered domenikk CC BY-SA 4.0