3 ms·
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) an
by ketzo 1y ago
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
- nop_slide 1y agoMaybe because mongo isn’t ideal for relational data?
- wredcoll 1y agoDoes mongodb optimize joins at all? Do they even happen server side?
- merek 1y agoI believe a lot of Mongo's criticisms come from people modelling highly relational data on a non-relational DB.
- rwyinuse 1y agoI'm not sure what is the point of using MongoDB these days, when you can as easily store and query jsonb in postgres.
- lelanthran 1y ago> 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.