Hacker News new | ask | show | jobs
by tgv 919 days ago
I use it on-prem (well, on a VPS). It stores JSON documents, and it's easy to work with. If your data looks like a tree, it works pretty well, also for large documents. If you depend on relations between documents, you're better off with an SQL database, but note that for many cases --I'd say practically all mundane cases-- there's really no need for relations the SQL way. MongoDB also does relations, but a bit more convoluted.
1 comments

Postgres does all that plus 100x.
I've also tried SQLite, but they didn't do large documents that well. And the project was started before I was aware Postgresql had json support.

But what's the advantage of Postgresql in this case?

But the horizontal scaling is easier with Mongo than Citus.
But you don't need to horizontally scale if you use a beefy Postgres instance. Horizontal scaling is a problem created by using an inefficient DB in the first place.
I have DB clusters with masters with a terrabyte of ram. Going beyond that is a PITA with warming up cache, backups, and so on. There is a reason there's a huge industry for shared databases.

Also, query for query, Mongo isn't going to be that much slower than PG, and faster for some usage patterns...

*sharded