Postgres vs MySQL: Which one is more difficult to scale out?

While this question appears to go against the "Avoid asking subjective or argumentative questions" tenet of the site I can't resist trying an answer.

It depends.

Are talking about a single server configuration that scales to very large datasets?
Both can work in this situation depending on the dataset, but neither will probably perform very well without custom configuration and proper planning. In my experience when working on large datasets with lots of writes I've found Postgres has fewer conditions that cause blocking and overall performance was better.

Are you talking about multi server configurations that scale to many slaves for many readers?
MySQL has historically been considered the leader in this space since it came with asynchronous replication built in. This is no longer the case if you're not opposed to using the newest DB software; Postgres now also has this built in with the release of 9.0. My experiences with MySQL's replication have been more than adequate to this point.

Are you talking about multi server configurations that scale to many masters for many writers?
This is by far the most difficult way to scale either product and many times can be avoided through the use of failover servers. If you really do need to scale out for high availability of master servers addons/alternate installs cannot be avoided. For MySQL there is MySQL Cluster NDB which has an open source option or a commercial version. For Postgres there are many addons that can get you varying levels of HA and pooling

In the long run the scaling of your database typically comes down to design planning. If your application is designed with scale in mind then the db system that matches best to your developers is often the best choice.


PostGre has more features and configuration options.

Thus it's likely it's more difficult to scale, but it's also likely that it will scale better, that is, if properly configured.

Generally, MySQL will probably still be faster, on the other hand, the real question is how much do you value data integrity, and what features do you need, and do you want to depend on Oracle (now owns MySQL) ?

Also, there are licensing questions, like do you really want to buy a MySQL license just because you don't want to publish your application under the GPL ?
With PostGreSQL, this is no problem, which is a very big plus.