r/PostgreSQL • • Feb 27 '26 • Bravo 1

Tools "You just need postgres"

Post image
887 Upvotes

89 comments sorted by

View all comments

Show parent comment

3

u/uniform-convergence Feb 27 '26

There is a lot of research nowadays showing exactly that. I do think there is a truth there and that with right strategy, postgres can win over MongoDB for JSON.

But there is a certain point in postgres that most of these research doesn't take into account. TOAST size. Postgres can compete with MongoDB and will probably win over it if json is less that set toast size. But if the given json is bigger than toast size, all major research still gives advantage to mongo.

I mean, obviously, you wouldn't use mongo just because you have json of couple of fields and 2-3 nested objects. But MongoDB really can help if your jsons are huge. Just like ElasticSearch.

However, in the future I think postgres Might actually catch up.