logoalt Hacker News

ketzo05/15/20252 repliesview on HN

Not 100% parallel, but I was debugging a slow endpoint earlier today in our app which uses Mongo/mongoose.

I removed a $lookup (the mongodb JOIN equivalent) and replaced it with, as Prisma does, two table lookups and an in-memory join

p90 response times dropped from 35 seconds to 1.2 seconds


Replies

lelanthran05/15/2025

> I removed a $lookup (the mongodb JOIN equivalent)

There is no "MongoDB JOIN equivalent" because MongoDB is not a relationalal database.

It's like calling "retrieve table results sequentially using previous table's result-set" a JOIN; it's not.

nop_slide05/15/2025

Maybe because mongo isn’t ideal for relational data?

show 2 replies