6 ms·
Even those use cases can sometimes be met by an RDBMS. Postgres can outperform Mongo as a key value, or json doc store. But Mongo is what many people think of f
by Bedon292 10y ago
Even those use cases can sometimes be met by an RDBMS. Postgres can outperform Mongo as a key value, or json doc store. But Mongo is what many people think of for something like that.
- quizotic 10y agoAnd for those who may not know, but appreciate irony, Mongo now uses ... wait for it ... a somewhat stripped down, key-value-ish, embedded ... RDBMS as its underlying data store. Yes friends, "it's a dessert topping AND a floor wax"
- quizotic 10y agoshould also point out that Mongo is more than a jsonb store, and postgres is, at least currently, less than a distributed, "scale-out" database. Mongo supports problems that postgres cannot currently address. period. (and I'm a huge postgres fanboi)
- philliphaydon 10y agoCould you share some of those problems? (genuinely interested)
- phamilton 10y agoHorizontal scalability. Outgrowing a single master database (writes being bottlenecked, not reads) is really painful. You can engineer around it, but spinning up another master in a multimaster DB is a really quick and easy fix (once you have tooling built out it's a matter of minutes). Sharding your Postgres DB is not a quick and easy fix. It will likely take about a month to engineer around and perform the data migration, if not longer.
- threeseed 10y agoPostgreSQL outperforms MongoDB how ? Because as someone who has tried to update JSON documents (1M/s) in both PostgreSQL and MongoDB I would strongly disagree. MongoDB with WiredTiger was at least 10x faster per node and in terms of pure updates one of the fastest databases I've ever seen. And before the trolls yes I was fsyncing to disk.
- drdaeman 10y agoPostgres doesn't fancy many small and frequent updates (like rapid counter increments). It is workable, though, via combination of batching, ensuyring indexes on hot fields have appropriate fillfactor, and making sure Postgres can use heap-only tuples. Here's my old SO question on this and a well-comprehensive answer that's still actual and could be helpful for some cases: http://stackoverflow.com/a/1663434/116546 http://stackoverflow.com/a/1663434/116546
- zapov 10y agofwiw https://www.enterprisedb.com/postgres-plus-edb-blog/marc-linster/postgres-outperforms-mongodb-and-ushers-new-developer-reality https://www.enterprisedb.com/postgres-plus-edb-blog/marc-lin...
- threeseed 10y agoNot worth much. MongoDB is a completely different beast after version 3.0 with WiredTiger being the default. But I am sure that there are use cases for which PostgreSQL is going to be much faster in particular single field lookups on unindexed fields across all records. My point is that it's never black & white to say Database A is faster than Database B. It's always use case dependent.
- zapov 10y agowell there is also https://www.techempower.com/benchmarks/#section=data-r13&hw=cl&test=update&d=e2 https://www.techempower.com/benchmarks/#section=data-r13&hw=... Point being when someone says something is faster without providing verifiable numbers... it should not really be taken seriously