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…
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…
PostgreSQL Outperforms MongoDB in New Round of Tests
141–150 of 171 posts
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#142Earlier 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.
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.
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#143Earlier quoted context omitted.
The improvements to hstore (primarily to make it hierarchical and add array support) ended up becoming jsonb.
Could you confirm that you can atomically update a single item inside a jsonb field without reading/writing all of the jsonb data? I know this is possible with hstore (but not 9.3's json type), but can not find a clear answer for jsonb in the documentation. Any pertinent links would be much appreciated!
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#144I never really "got" the new wave of NoSQL databases. Mongo seemed to be the one I could most easily wrap my head around, but still. I was never sure, though, if that meant I had never faced a problem suitable for one of these DBMSs or if my mind is just so warped by years of using relational engines (mostly Postgres, or SQLite for simple projects) that I could not think of modeling my data any other way. Recently th…
I think people mix up three things: (1) Transactional model. Many NoSQL databases are non-ACID, but others are (Google's stores all have some transactional guarantees). Some databases try to gain efficiency by relaxing their transactional guarantees, some probably just didn't get around to implementing a proper transactional system yet. (2) Data model. The relational models can be overly restrictive as you cannot eas…
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#145Earlier 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 wonder if Node.js will follow the same fate...get a nice dose of reality check. It is mistakenly evangelized as also being faster, leaner, scalable, more concurrent than anything out there. Some clients would pay extra to redo CRUD using Node.js because it's "Asynchronous and We wanna Pay For Speed and Scalability".
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#146Earlier 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 wonder if Node.js will follow the same fate...get a nice dose of reality check. It is mistakenly evangelized as also being faster, leaner, scalable, more concurrent than anything out there. Some clients would pay extra to redo CRUD using Node.js because it's "Asynchronous and We wanna Pay For Speed and Scalability".
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#147This benchmark misses the entire point of MongoDB: that you can atomically update individual fields in the document. Thas has not been possible with Postgres json storage type. Instead, the entire JSON blob must be read out, modified, and inserted back in. This reality is well known to those that understand Postgres, which is why they have HStore. HStore is limited though (particularly to the size of the store), so t…
Postgres has first-class arrays too: http://www.postgresql.org/docs/9.3/static/arrays.html
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#148Earlier quoted context omitted.
Could you confirm that you can atomically update a single item inside a jsonb field without reading/writing all of the jsonb data? I know this is possible with hstore (but not 9.3's json type), but can not find a clear answer for jsonb in the documentation. Any pertinent links would be much appreciated!
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.
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#149This is very interesting. Around when MongoDB was quickly becoming the cool thing to do I'd ask people about why it is better than just storing things in Postgres. People would have answers that would be grammatically correct but would not make any sense. That being said, I find it weird that now it is cool to make fun of MongoDB. Some people on this thread have even said they want to know if a service is using Mongo…
> Stripe (who store your money related stuff in MongoDB) That's a bit scary. There has been several successful attacks against virtual currency exchanges that use MongoDB, utilizing the eventual consistency to your advantage. If you handle money, you don't want any inconsistencies in your database, no matter how temporary. You can work around these of course but you really need to know what you're doing.
against solemnly depending on MongoDB's eventual consistency alone.
Re: PostgreSQL Outperforms MongoDB in New Round of Tests
#150Only problem I have with JSON on Postgres is you can't update a property of a JSON object like so: update table set jsonCol->propertyA = 42; You need to write an extension for that. Easiest to do so using Python but sadly Heroku doesn't support python on postgres since its unsafe.
You can use PLV8 to do that in javascript on heroku.
[0] https://blog.heroku.com/archives/2013/6/5/javascript_in_your...