logoalt Hacker News

ketzotoday at 1:30 AM2 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

lelanthrantoday at 11:23 AM

> 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_slidetoday at 3:36 AM

Maybe because mongo isn’t ideal for relational data?

show 2 replies