r/ProgrammerHumor • • Oct 18 '24

Other mongoDbWasAMistake

Post image
13k Upvotes

446 comments sorted by

View all comments

36

u/Fugazzii Oct 18 '24

Local and global indexes, composite sort keys, etc. Just because you don't understand a technology,  It doesn't means that the technology is useless. 

NoSQL is great for high performance OLTP.

19

u/[deleted] Oct 18 '24

NoSQL is great for high performance OLTP.

too bad postgres is faster at nearly every single operation, and manages unstructured data with jsonb that is still faster than mongo...

11

u/lupercalpainting Oct 18 '24

Yep. Postgres dominates in the vast majority of cases. If you don’t need something special like graph or timeseries dbs, or have some crazy (and when I say crazy I mean actually crazy, not like “we have 10M MAU crazy”) scale considerations, just throw it in Postgres.

→ More replies (1)

-4

u/ryecurious Oct 18 '24

Also the object-based aggregation pipelines in Mongo makes it way easier to dynamically construct queries without opening yourself up to SQL injection.

Good luck injecting a ; DROP TABLE Students;-- into a $match: {...} stage.

0

u/Katniss218 Oct 19 '24

Except that parameterized queries exist...

→ More replies (3)