Why PostgreSQL > MySQL
- MySQL has a very poor optimizer/planner - so many queries will run very poorly, you'll often have to waste time tweaking queries or simply giving up on some complex ones. These same queries would work perfectly fine on postgresql, orcacle, db2, or sql server.
- MySQL rewrites tables when you change anything on them, Other databases like Postgresql, etc, etc allow you to easily change the table in place. On a big table this might mean the difference between a 10-second change and a 10-hour change.
- Postgresql, DB2, etc allow you to change the type of a column without rewriting the table. MySQL does not.
- MySQL tends to ignore errors - silently truncating digits that won't fit into a column, accepting bad dates, failing to use the transactional back-end, etc, etc. This can make it easy to develop since you simply won't see errors. But it can kill you later when you realize your data is garbage or you didn't really have the ability to rollback a transaction. Postgresql, etc would not do this.
MySQL has a vast array of bizarre bugs & gotchas that Postgresql, etc don't have.
- Prior to implementing transactions, partitions, views, subselects, triggers, etc MySQL AB stated that 90% of developers don't need that stuff. When they finally did implement these essential features they just seemed to slap it together and the resulting implementations have a ton of rough edges. Postgresql, on the other hand, has an incredibly high-quality code-base. Those guys just don't ship code like this.
- Postgresql's licensing is unambiguous and clear on its use. MySQL's dual licensing was designed to push as many people towards licensing as possible (tho it may be better now).
MySQL made a lot of sense as a database choice around 1999-2001. And it still has a lot of market share. But it's completely outclassed by Postgresql.
PostgreSQL is just built solid. That's not an argument that meant anything to me back when I was a MySQL developer, it was too vague. But then one day after I'd migrated to Postgres, I realized I wasn't fighting with the database anymore, it never stopped working, it didn't have that fragile feel that MySQL has. I just felt better about writing database features into an app because I felt more secure that it would work.