News for hackers. Stuff that matters.
Re:Migrating to Postgres by ketzo on Wednesday May 14, 2025 @09:30PM (#43990954)
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

Re:Migrating to Postgres by nop_slide on Wednesday May 14, 2025 @11:36PM (#43991595)
Maybe because mongo isn’t ideal for relational data?
Re:Migrating to Postgres by wredcoll on Thursday May 15, 2025 @12:07AM (#43991759)
Does mongodb optimize joins at all? Do they even happen server side?
Re:Migrating to Postgres by merek on Thursday May 15, 2025 @03:13AM (#43992589)
I believe a lot of Mongo's criticisms come from people modelling highly relational data on a non-relational DB.
Re:Migrating to Postgres by rwyinuse on Thursday May 15, 2025 @11:02AM (#43995792)
I'm not sure what is the point of using MongoDB these days, when you can as easily store and query jsonb in postgres.
Re:Migrating to Postgres by lelanthran on Thursday May 15, 2025 @07:23AM (#43993858)
> 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.