Hacker News new | ask | show | jobs
by smoyer 5024 days ago
I've never been able to completely dismiss MySQL since it obviously works for so many users, but I also haven't found it very useful in my work. I started with PostgreSQL in the '90s and every time I tried to use MySQL, I found myself asking either "why did it do that"? or "why would I want that"?

The article describes two databases that are very different conceptually, and I think they're mirrored by users that conceptually think about data in different ways. So if one or the other works well for you, go for it.

I should note that I have successfully deployed applications on both platforms ... once I started doing most of my database interactions through an ORM, the differences didn't really matter any more.

Vive la difference!

2 comments

One thing I would say matters a lot still even if you use an ORM is PostgreSQL's support for transactional DDL. No more worrying about migrations crashing in the middle. You should of course still test your migrations but one less thing to worry about is always nice.
Interestingly the two db's I can think of that don't support transactional DDL are both Oracle products ;-)

Oracle has something that kind of looks like transactional DDL if you stand on your head and squint, but it doesn't cover, say, changes to table schemas.... it's only side by side versioning of stored procedures.....

I think MySQL's original success came from features that are less obvious when developing (although that said it does have some friendlier development syntax (e.g. show create table) and lower startup latency in interactive use). It made running multiple instances on a single host easy. MyISAM tables give amazing performance in return for weakening many consistency guarantees, which is a worthwhile tradeoff for many use cases. Postgres is only just starting to gain the level of clustering support that MySQL has had for years.
The performance benefits of MyISAM are exaggerated. Its advantage was that is was a decently fast and very simple engine which made it possible for MySQL to reach the market quickly.

MyISAM only gives good performance when you either have only reads or just one single writer. And even then it does not always win over InnoDB and PostgreSQL. And as soon as you get a mixed load MyISAM performance drops like a stone.

Actually I agree about the MyISAM tables. Those are great for lightweight content management, more or less that initial use case I mentioned.

The other thing is that when I switched to PostgreSQL for important work, I still had to keep MySQL around for database prototyping because it wasn't until 7.3 that I could drop columns from a table. PostgreSQL was pretty ugly and hard to work with in 1999 but it has gotten a lot better. I would further note that while PostgreSQL has gotten a lot faster, MySQL has become more feature-complete at the expense of speed.