Hacker News new | past | comments | ask | show | jobs | submit login

Out of curiosity: Why not mysql? I am also surprised that no one has even mentioned mysql in any of the comments so far -- so looks like the verdict is very clear on that one

PS: I am also a fan of Postgres, and we are using that for our startup. But I don't know the answer if someone asks me, why not Mysql. Hence asking




To my knowledge, both Postgres and MySQL has their own strengths and weaknesses. Example: mvcc implementation, data replication, connection pooling and difficulty of upgrades were the major weaknesses of Postgres which are much improved over time. Similarly mysql query optimizer is consider lesser developed than that of Postgres's.

Overall I think Postgres adoption and integrations and thus community is much more wider than MySQL which gives it major advantage over MySQL. Also looking at the number of database-as-a-service companies of Postgres vs those of MySQL we can immediately acknowledges that Postgres is much widely adopted.


A few other things I would add:

- MySQL performs a bit better when reading by primary key

- Postgres performs a bit better when doing random inserts/updates.

- MySQL you don't need to worry about vacuums

- The MySQL query optimizer is nice because you can give it hints when it misbehaves. This can be a godsend during certain production incidents.

- Last I checked MySQL still has a nicer scaling story than postgres, but I'm not sure what the latest here is.

- Connection pooling is still heavily in MySQLs favor i.e. you don't need the PG bouncer for lots for scenarios.


There was an article from Uber on why they shifted from Postgres to Mysql: https://www.uber.com/en-IN/blog/postgres-to-mysql-migration/

I don't know how much of that article points are still valid.

The other part in favor of mysql (in my opinion) are that there are lots of companies that use mysql in production - so the access patterns, and its quirks are very well defined Companies like Square, YouTube, Meta, Pinterest, now Uber all use mysql. From blind, Stripe was also thinking of moving all its fleet from Mongo to mysql

Perception wise, it looks like companies needing internet scale data are using mysql


I think this might come down to… Oracle.

Obviously there are alternatives like MariaDB but Postgres is a quality long standing open source solution.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: