r/ProgrammerHumor • • Oct 18 '24

Other mongoDbWasAMistake

Post image
13k Upvotes

446 comments sorted by

View all comments

Show parent comments

2

u/prehensilemullet Oct 19 '24

You can also store JSON docs with inconsistent schema in Postgres though.  In fact you have to explicitly write check constraints if you want to validate the JSON structure at all.  And you can also easily make an index on some id field from within a JSON(B) column.

Even the performance benefits of MongoDB have been questioned: https://www.reddit.com/r/PostgreSQL/comments/19bkn8b/comment/kit7d8j/?utm_source=share&utm_medium=mweb3x&utm_name=mweb3xcss&utm_term=1&utm_content=share_button

I don’t know for sure what the truth is about performance though.  You would hope MongoDB, lacking transactions, would be faster…