3 ms·
I can think of reasons. I have a personal dislike of mongodb, for many reasons but I’m going to put them aside for a moment. MongoDB beats PostgreSQL because
by dijit 8y ago
I can think of reasons.
I have a personal dislike of mongodb, for many reasons but I’m going to put them aside for a moment.
MongoDB beats PostgreSQL because it’s relatively easy to shard and scale. If your application logic isn’t quite capable of sharding then mongodb handles this and replication for you.
It’s also true that mongodb attempts quorum over consistency. Which is just fundamentally different than how PostgreSQL works, it is possible that mongodb can be faster in a very large mesh topology.
What I am hoping for in future is that something like elasticsearch exists but with PostgreSQL as it’s engine instead of lucene. Such a system would be a complete death knell to mongodb.
- SOLAR_FIELDS 8y agoIt's not native support but more than a couple times I have wondered how well this works: https://github.com/zombodb/zombodb https://github.com/zombodb/zombodb Doesn't seem to be a whole lot of people trying it out, though the project is 'relatively' active.
- wenc 8y agoYes. I think the major advantage of NoSQL databases was easy horizontal scaling (shard + scale + seamless failover) at a time when it was difficult to do these things with SQL databases. However, NoSQL's original advantages have started to fade with db's like Citus and TimescaleDB, and even FB's MyRocks. NoSQL databases are optimized for straight data retrieval and horizontal scaling. If you want to dump lots of naturally unstructured or semi- or variable-structured data (like logs) into a distributed data store and retrieve them quickly without doing any non-trivial manipulation on them, Mongo will likely fit the use case. It's fast, strongly consistent, supports secondary indices etc. However, as soon as you need to manipulate your data (i.e. analytics use cases), you're much better off doing a bit of data modeling up front and using a SQL database.