BLUE
Profile banner
RB
Rituraj Borpujari
@riturajborpujari.bsky.social
Coder | Problem Solver | Technology Enthusiast I write at riturajborpujari.com/posts
4 followers23 following28 posts

Okay maybe I'm overthinking here, why not just use an aggregation query that hydrates child records by using $lookup? That turned out to be faster as the calls to mongodb were few Also, updated the $projection clause to select only the required fields. Result: 200 hydrated parents in 2s!!!

0

Profile banner
RB
Rituraj Borpujari
@riturajborpujari.bsky.social
Coder | Problem Solver | Technology Enthusiast I write at riturajborpujari.com/posts
4 followers23 following28 posts