Live data from Hacker News

PostgreSQL Outperforms MongoDB in New Round of Tests

blogs.enterprisedb.com

151–160 of 171 posts

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#151
post #97

Earlier quoted context omitted.

The entire narrative behind MongoDB in the first chapters of its evangelism was performance, partly due to its document-oriented approach (things are quicker in some scenarios when you get rid of relations, and it was contrast against the many tables approach), which is something that you can only very recently do in pgsql, and partly due to implementation choices like the dangerous default lack of fsync. Early evang…

I'll pose the inappropriate question. Unless you are going to do it right (RethinkDB) why write a brand new database at all (MongoDB?)

money, of course. position yourself well and investors come a-callin. buy yourself a lambo.

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#152

Earlier quoted context omitted.

Just because you haven't had a failure yet , it doesn't make the test any less true.

Three years? Numerous customers? That's good enough for me so far.

Ok, granted, my experience is an anecdote, but downvoting me without disputing what I'm saying? Pure cowardice. At least counter with your own anecdote, don't downvote. Or let me know why I'm being downvoted, simply disagreeing shouldn't result in a downvote, that just kills the conversation.

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#153

Earlier quoted context omitted.

Have you actually tested a net split situation, or a crash, or what it'd take to recover?

Yep, sure have. And you still need backups of your data, that's just good sense.

Nitramp, I'm sorry you disagree with my experience. But instead of downvoting, why don't you contribute to the conversation with your own experience? At least my experience is taken from the real world and not from something I read on the internet.

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#154
post #79
post #65

Did I miss something? MongoDB was never ever faster than Postgres. That's nothing new. Most of these things are clear when one reads the MongoDB docs: MongoDB stores Metadata, (nearly) uncompressed on a per document basis, so of course it uses way more diskspace. It doesn't store the data in any efficient way either. Also it's pretty much unoptimized, compared to Postgres which has been around for a really long time…

Is MongoDB's distribution and scaling story really nicer? A cluster story that's easy to set up but then doesn't actually work (loses data, fails in potentially catastrophic ways) sounds not all that useful. http://aphyr.com/posts/284-call-me-maybe-mongodb

Mongodb is easy to setup as a single instance, but it is definitely no easier to setup for horizontal scaling compared to alternatives. I'm still not aware of anything that's both simple to setup and maintain for horizontal scaling in practice (not theory).

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#155

Earlier quoted context omitted.

Three years? Numerous customers? That's good enough for me so far.

C'mon you know that isn't fair reasoning, you could say the same about running backups. Just because someone hasn't seen the need for backups for three years after numerous customers doesn't mean thats a good enough reason to not keep backups. I'm not saying you shouldn't use Mongo, but to say Aphyr's assessment of database shouldn't be considered in all deployments isn't wise.

I'm not saying Aphyr's work isn't useful, it's the right tool for the job. For our needs and uses, it's been spectacular. I want to use Postgres, but it's HA isn't something I'm willing to expose to my customers. So I'm actually using MongoDB in anger ... and it's doing spectacular.

So let me leave off with our use case. We have few writes, little need for sharding (our largest customers run on a single node and keep the hot data in memory), we use acknowledged writes (MongoDB can be journaled you know), and our customers are willing to have three + nodes in an HA scenario. The HA is simple to configure. So far in three years we have no data loss.

What more information can I provide to make up for the downvotes?

As an aside, downvotes to me should be used for those that contribute nothing to a conversation. If you disagree with what someone says, state your disagreement so that we all, including me, can benefit from your better experience.

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#156

Earlier quoted context omitted.

You can't. Others in this conversation have pointed out this is targeted for 9.5, though it may available as an extension before that.

I'm pretty sure you can using a stored procedure written with plv8. Though that's not exactly a fluent and elegant natural solution

You're only avoiding putting the whole thing on the wire twice.

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#157
post #59
post #44

MongoDB work well ONLY if indexes (and working set) fit in the memory. What are the indexes size in the benchmark? (I doubt as I see you are running a 145GB database on a 32GB instance) http://docs.mongodb.org/manual/tutorial/ensure-indexes-fit-r...

once you start page faulting and hitting spinning disk it's game over for any database's performance, postgres included.

That sounds like bollocks.

I have a script that grows a bit Perl hash. It fills up memory and starts paging. The application grinds to a halt (almost). I tie the hash to Berkly DB file, so it writes to disk. Performance is about a third of the in memory hash, BUT doesn't slow when it's too big for memory.

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#159

Earlier quoted context omitted.

How about implementing MongoDB API on top of the PostgreSQL? Then sell it companies which started with MongoDB, but run into some scalability/reliability issues.

I wonder how far one could go with this. I'm currently playing around with Meteor which requires MongoDB. I wonder if a MongoDB API on top of PostresSQL would be a path to start bringing in relational DB capabilities to Meteor? But perhaps Meteor's use of Mongo is too deeply intertwined and goes deeper than an application-level API.

Metor contains an implementation of mongodb written in js to support transparent use of data access in eith client or server.

Re: PostgreSQL Outperforms MongoDB in New Round of Tests

#160
post #103

Earlier quoted context omitted.

> I never really "got" the new wave of NoSQL databases. It's easy: Overzealous DBAs who insist in normalization at all costs. A new technology allows developers to try new approaches to the challenges, by sidestepping those DBAs.

So, a technological solution to a political problem. Now I can understand where that people are coming from.

If I hadn't seen so many dev teams eschew constraints and triggers in favor of broken client code being allowed to screw up the data, I would agree to the political element easily. But in practice, the ignorance is so great, I can't even be sure there is a political choice being made.
Post reply on HN