Live data from Hacker News

Why PostgreSQL is better than MySQL

blog.2ndquadrant.com

21–30 of 100 posts

Re: Why PostgreSQL is better than MySQL

#22
post #20
post #15

This post actually makes me wonder... is there anyone that objectively still thinks MySQL is the better database of the two? The only small advantage of MySQL I can think of (which is a great downside as well) is that it's really tolerant towards all sorts of erroneous usage and data. The following should be a problem but are accepted by MySQL - missing group by clauses - all of the `ignore` commands (insert, alter t…

Are you sure mysql doesn't enforce foreign key constraints? I recently did a project with mysql backend and it did threw constraint errors on invalid inputs that didn't match a parent key record.

You're partially correct. It does when inserting or updating, but if you do an alter ignore table you can create foreign key constraints that are actually invalid.

So... not in all cases

Re: Why PostgreSQL is better than MySQL

#23
post #15

This post actually makes me wonder... is there anyone that objectively still thinks MySQL is the better database of the two? The only small advantage of MySQL I can think of (which is a great downside as well) is that it's really tolerant towards all sorts of erroneous usage and data. The following should be a problem but are accepted by MySQL - missing group by clauses - all of the `ignore` commands (insert, alter t…

Doesn’t innodb atleast enforce those constraints?

Re: Why PostgreSQL is better than MySQL

#24
post #15

This post actually makes me wonder... is there anyone that objectively still thinks MySQL is the better database of the two? The only small advantage of MySQL I can think of (which is a great downside as well) is that it's really tolerant towards all sorts of erroneous usage and data. The following should be a problem but are accepted by MySQL - missing group by clauses - all of the `ignore` commands (insert, alter t…

Doesn’t innodb atleast enforce those constraints?

During most normal operations such as updates, inserts and deletes it will enforce them. But, opposed to other databases, you are allowed to completely ignore your foreign key constraints leaving you with a (in my opinion) possibly corrupt database.

  SET FOREIGN_KEY_CHECKS = 0;
  INSERT INTO ...
  SET FOREIGN_KEY_CHECKS = 1;
Now you might have data in your database that's actually incorrect.

Re: Why PostgreSQL is better than MySQL

#25
post #17
post #15

This post actually makes me wonder... is there anyone that objectively still thinks MySQL is the better database of the two? The only small advantage of MySQL I can think of (which is a great downside as well) is that it's really tolerant towards all sorts of erroneous usage and data. The following should be a problem but are accepted by MySQL - missing group by clauses - all of the `ignore` commands (insert, alter t…

Uber switched from Postgres to MySql. https://eng.uber.com/mysql-migration/ If I remember right, though, mostly because their use pattern was more like a key value store, and MySQL worked better for that pattern.

Thank you, very interesting read! They do raise a few good points where MySQL outperforms PostgreSQL. I suppose that's one of the trade offs between them, data safety vs. performance.

Re: Why PostgreSQL is better than MySQL

#26
post #19

Earlier quoted context omitted.

On a more serious note, what makes Postgres so reliable is a number of things. For example: * careful patch review process - Sometimes it's a bit grueling, and it takes time to get stuff in, but it's extremely valuable. Not only for finding bugs but alternative approaches to implementing the feature. * careful testing - It's a natural part of the review process (Does the patch have tests? Can I come up with something…

Was Postgres always this way? Was the code from Berkeley abnormally stable/robust for commercial software (and extremely abnormally stable/robust for academic software), or was there an effort to clean it up to get to high quality?

I wasn't around back then, but AFAIK it improved over time.

Re: Why PostgreSQL is better than MySQL

#27
Curious: has anyone tried linking a Postgres installation with a MySQL installation using https://github.com/EnterpriseDB/mysql_fdw ?

My intuition is that, if there's anything MySQL does uniquely well on the "being an ACID datastore" front, then this would let you get the best of both worlds—essentially letting some of your Postgres tables use MySQL's storage engines et al.

Re: Why PostgreSQL is better than MySQL

#28

Earlier quoted context omitted.

Fix bugs, don't track them.

That seems like a bit of a false dichotomy. Do the Postgres Devs genuinely see having a bug tracker as a "bad thing"? Or are they just stuck in their ways at this point? A mailing list hardly seems like an efficient method for tracking bugs unless a major part of the efficiency is reducing signal to noise by make it more difficult for non-developer or non-paying users to file bugs

Well, it was not really meant entirely seriously, of course.

I can't speak for other devs contributing to the project, but I think the mailing list is a great way to do this. Ultimately, what you want is a simple way to track information about reported issues, discuss the details, make it reasonably simple to search for existing issues, and post patches fixing the issue. A mailing list does all of that, without having to deploy (and maintain and curate) a separate system.

Why do you think it's more difficult to report a bug this way, compared to a bug tracker? There's even a "report a bug" link on the project home page, where you can submit a bug report through a simple web form (you need a community account, but every other bug tracker I'm aware of requires that too).

Can you explain why you think a mailing list is less efficient than a bug tracker?

Re: Why PostgreSQL is better than MySQL

#29
post #17
post #15

This post actually makes me wonder... is there anyone that objectively still thinks MySQL is the better database of the two? The only small advantage of MySQL I can think of (which is a great downside as well) is that it's really tolerant towards all sorts of erroneous usage and data. The following should be a problem but are accepted by MySQL - missing group by clauses - all of the `ignore` commands (insert, alter t…

Uber switched from Postgres to MySql. https://eng.uber.com/mysql-migration/ If I remember right, though, mostly because their use pattern was more like a key value store, and MySQL worked better for that pattern.

> Uber switched from Postgres to MySql.

really uber should not taken as an example, especially since they failed so hard with their databases in the past.

(I'm a Postgres fan, yes, but I think that there a valid reasons to migrate to MySQL (there are several other companies who use mysql, etc but Uber's stuff is just plain FUD))

Post reply on HN