Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is it? MySQL improved a lot since 5.1 days, you know.


That's true, and I don't doubt that many developers' opinion of MySQL is tainted by some of the issues in earlier versions. It's still difficult to see what newer versions offer over Postgres though - and Postgres has a lot of bonus features too (like the JSON storage types, which are sublime)


Based on my experience: MySQL is significantly easier to set up, and it's much easier to admin. PG still seems to do the thing where it assumes your system user is your database user unless you do a bunch of things, and the weird blurred lines between the operating system and the database can get really confusing at the start.

On top of that, MySQL is well-documented and lots of people use it for lots of different things, which makes the most common (and most of the uncommon) problems eminently google-able.

Anecdotally, I've avoided Postgres also in part because it had the same problem that Perl had when I got into Linux: the community was pretty toxic and unwelcoming. I asked about replication once, and I got a bunch of answers that fell into a few categories: 'Why on earth do you need replication?', 'You don't need replication, Postgres is fast enough', 'set up a script to rsync your data directories over and over again', 'mysql replication is unreliable so you shouldn't use it so it doesn't matter'.

That sort of attitude drove me (and, I'd wager, a lot of other people) away from Postgres and towards the vastly more welcoming MySQL community, and I'd wager that a lot of people just kind of stuck there because why switch?

Postgres has added a lot of pretty great features lately, and it seems good? But I'm left wondering why I should use Postgres for my RDBMS, my JSON data store, and my KV store, when history has shown that one piece of software that expands to do everything rarely does any of it well.

(Postgres has since gained replication abilities)


> On top of that, MySQL is well-documented

I seriously disagree with that. Documentation is one of MySQL's weakness, especially compared to PostgreSQL which is known to have one of the best documentation in the open source world.


I think the comment you're replying to might be using "documentation" to mean Stack Overflow.

I really love the PostgreSQL manual.


By 'a bunch of things' you mean uncomment like 2 lines in the config, right?


Well, he's right about it, kinda. I don't have problems with Postgres, but I do wish it had some defaults that made a bit more sense.


I think the defaults make a fair bit of sense. Do you want it listening on a network interface by default?


I'm a big believer in PostgreSQL but it does have one large and glaringly bad area which needs addressing: distribution. MySQL does Master-Master well. PostgreSQL has been a "chose your own adventure" for a long, long time. With the changes they're planning to make to allow better replication, that will change. Right now, MySQL has that aspect beat.


The thing is that generally in Postgres is conservative and avoids features that would endanger data, unless they have a good solution for it.


If you knew what newer versions of MySQL offered, you would be aware that it also supports JSON.


Sorry for not having comprehensive knowledge. I see that MySQL added support for a JSON datatype in the past year – I just knew it wasn't in 5.7 last time I looked, and it seems like an unusual feature to add in a 'patch' version.


Has MySQL added support for Common Table Expressions (CTE) yet? CTE was added to the SQL standard in 1999.

I ask because I always miss this feature when querying MySQL.


Trolling along, what about working correlated subqueries that don't degrade into a cartesian join of all rows?


Latest postgres's have improved tons too. Seems like we're seeing 10% speedups with every point release. Some of the new parrellization stuff in 9.6 is really sexy.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: