Live data from Hacker News

MySQL - Do Not Pass This Way Again

grimoire.ca

21–30 of 164 posts

Re: MySQL - Do Not Pass This Way Again

#21

I'm really not sure what to think of that article. On one hand side, I definitely agree with it and I've experienced many issues with MySQL. On the other, there are so many... strange points, it's hard for me to trust the author about the parts that are new to me. Things I've found weird so far are: - "my favourite example being a fat-fingered UPDATE query where a mistyped = (as -, off by a single key) caused 90% of…

"I want to use the wrong syntax, but still get the right answer"

The point is that wrong syntax should error instead of letting the user think it worked. Problems like this means the user has no idea if the FK was setup without testing it. IMHO, there is nothing okay with silently failing.

Re: MySQL - Do Not Pass This Way Again

#22
post #21

I'm really not sure what to think of that article. On one hand side, I definitely agree with it and I've experienced many issues with MySQL. On the other, there are so many... strange points, it's hard for me to trust the author about the parts that are new to me. Things I've found weird so far are: - "my favourite example being a fat-fingered UPDATE query where a mistyped = (as -, off by a single key) caused 90% of…

"I want to use the wrong syntax, but still get the right answer" The point is that wrong syntax should error instead of letting the user think it worked. Problems like this means the user has no idea if the FK was setup without testing it. IMHO, there is nothing okay with silently failing.

It's not the wrong syntax, but you're right that it should error if MySQL isn't going to bother supporting it. Silent failures are just plain failures.

Re: MySQL - Do Not Pass This Way Again

#23
post #15
post #5

I'd be very interested to hear from people using other databases on whether their DB of choice is much better. I've been using MySQL for a while, have been burned by a few things, but figured it was mainly my fault. If indeed there are better options I'd love to hear the details. (Just to be clear, I know about other databases, just aren't sure if any are that much better in real world use).

Many of the complaints I hear people make about the entire concept of an "RDBMS" (often then to motivate why the NoSQL solution they decided to start using is better) are actually MySQL-specific issues that do not affect PostgreSQL (or Oracle, or usually SQL Server; I only mention PostgreSQL, as you wanted a concrete experience); one key example is "if you want to change your schema, it requires locking the entire sy…

To be fair, there are cases where schema changes in PostgreSQL require re-writing the table, too. Like, for example, when you change the data type of an existing column.

Otherwise, you're good, though.

Re: MySQL - Do Not Pass This Way Again

#24

If you must use MySQL, at least switch to MariaDB. Those Oracle folks can not be trusted anymore, not even with a toaster.

I agree that the MariaDB and Percona Server versions of MySQL are far superior in many ways, but Oracle, with 5.6 has proved their commitment to MySQL with some awesome new features. I admit there has been a reduction in transparency with the test cases fiasco, but beyond FUD, what is it that they "can't be trusted with?" Are you concerned that they are in there secretly making a bittorrent out of your database or something?

Re: MySQL - Do Not Pass This Way Again

#25
post #10

MySQL is the visual basic of SQL databases. Anyone can set one up and use it. The problem is that many non-technical people use MySQL and then think they know all about DBs. Ask them what ACID is, or about foreign key constraints. You'll get blank stares. If you know what those things are and value them, you probably don't use MySQL.

Can you provide some citations to this claim? I know a lot of people who understand ACID, Foreign Keys, and have experience with other DBs (like PostgreSQL) and still often choose MySQL based on its merits.

Re: MySQL - Do Not Pass This Way Again

#26
post #20

I'm really not sure what to think of that article. On one hand side, I definitely agree with it and I've experienced many issues with MySQL. On the other, there are so many... strange points, it's hard for me to trust the author about the parts that are new to me. Things I've found weird so far are: - "my favourite example being a fat-fingered UPDATE query where a mistyped = (as -, off by a single key) caused 90% of…

"Foreign keys are ignored if you spell them certain, common, ways" - another case of "I want to use the wrong syntax, but still get the right answer" Both forms of declaring foreign keys are SQL-standard compliant syntax. That MySQL silently ignores the "inline" version is the "wrong" here, not the syntax. From MySQL's own docs: "Furthermore, InnoDB does not recognize or support “inline REFERENCES specifications” (as…

I understand that and don't have issue with what he most likely meant - only what he wrote.

In short - MySQL does not always comply with the SQL standard. That's unfortunate / silly / annoying / inconsistent. I completely agree.

But I don't agree with "Foreign keys are ignored if you spell them certain, common, ways". This is not very specific. Common to what situation? People being used to it in another project? It's a documented behaviour. He seems to have a problem with the effect, not the cause. (or maybe I just read it that way...)

Re: MySQL - Do Not Pass This Way Again

#27
i read until the backup process and gave up reading through, for cold backups of online databases, you should use percona's extrabackup, its open source and free and works perfectly. http://www.percona.com/doc/percona-xtrabackup/ if you are using mysql a simple googling "hot backup mysql" will lead to that, i guess author didn't even bother to search.

besides, you need to use replication and connect a couple of slaves if you care about being online and backup from one of the slaves - which is a common practice for all databases not for mysql. if you are trying to dump from the master without slaves good luck with any database.

Re: MySQL - Do Not Pass This Way Again

#28

I'm really not sure what to think of that article. On one hand side, I definitely agree with it and I've experienced many issues with MySQL. On the other, there are so many... strange points, it's hard for me to trust the author about the parts that are new to me. Things I've found weird so far are: - "my favourite example being a fat-fingered UPDATE query where a mistyped = (as -, off by a single key) caused 90% of…

As the nice man said:

> MySQL is riddled with these sorts of surprises, and apologists lean very heavily on the "that's documented" excuse for its bad behaviour.

For a database, defaulting to safe behaviour should be the default, not something you need to look up.

Re: MySQL - Do Not Pass This Way Again

#29
post #7

I appreciate this well-argued piece of persuasive writing for not choosing MySQL, but the premise is surprising -- I don't recall seeing, on Hacker News or elsewhere, any writeups from companies that chose MySQL then ran into significant problems they had to architect around, nor writeups from companies that chose MySQL then had to rip everything out to switch to something in the same family of solutions (Postgres, O…

We migrated Lanyrd from MySQL to PostgreSQL, primarily to reduce the pain involved in running schemes alterations against large tables but we've since been enjoying some if the more advanced PostgreSQL features (pg_trgm indexes for example). You can read about our migration here: http://lanyrd.com/blog/2012/lanyrds-big-move/

Just wanted to confirm something. You say you have no single point of failure but you are running everything in one data center ?

Re: MySQL - Do Not Pass This Way Again

#30
post #10

MySQL is the visual basic of SQL databases. Anyone can set one up and use it. The problem is that many non-technical people use MySQL and then think they know all about DBs. Ask them what ACID is, or about foreign key constraints. You'll get blank stares. If you know what those things are and value them, you probably don't use MySQL.

I really don't know where to begin with such a stupid comment.

How about you start with listing which of these companies needs educating: http://www.mysql.com/customers/

Facebook ? Twitter ? Amazon ? Flickr ?

Post reply on HN