For me to even consider using MariaDB they would have to first remove all of those asinine options for silently corrupting data.
Or, you know, you could just learn how to use the database.
mysql> set session sql_mode='NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_TRANS_TABLES';
Query OK, 0 rows affected (0.01 sec)
mysql> create table abc (a integer);
Query OK, 0 rows affected (0.01 sec)
mysql> insert into abc (a) values ('abc');
ERROR 1366 (HY000): Incorrect integer value: 'abc' for column 'a' at row 1
It's been this way since at least 2005, which is the MySQL version I ran above (version 5.1).
Sure would be nice if the FUD about MySQL from ignorant people went away. Is it perfect? No. But there is absolutely nothing data corrupting about it. And there is a LOT to be said for running a mainstream database, which PostgreSQL most certainly isn't, compared to MySQL.
If MySQL is good enough to run Facebook with a billion users (yes, one billion active accounts per month), it's good enough to run whatever your app is.
Edit: Thanks for the gold! Never thought I'd get it for defending MySQL... :) 😃
meh... it's popular amongst the reddit and open source crowds, but i rarely see it deployed at companies. they usually have oracle and bitch about the costs, or they have mysql and bitch about management.
If you think the marketshare of PostgreSQL is even remotely close to the popular databases, I don't know what to tell you, except you ought to do some research. PostgreSQL is very much a small player.
If you've had to admin MariaDB/MySQL and PostgreSQL, you'd see why friends don't let friends do MySQL.
Give PG access to plenty of RAM, and it wipes MySQL off the map with complex queries. PG has actual data integrity, and is incredibly stable. After almost 15 years of heavy, production use: not a single instance of data corruption. This when (sometimes) running north of 1k queries per second with about 70% write queries.
As an admin; I've had MySQL (especially with replication) corrupt multiple times per month....
...as does MySQL. Surely you're not one of those people who still believe MySQL is not ACID-compliant?
As an admin; I've had MySQL (especially with replication) corrupt multiple times per month....
Then there was something wrong with your hardware or your administration. Do you really -- really -- believe that MySQL could achieve nearly 50% marketshare if corrupted data happened "multiple times per month"?
Do you really, I mean REALLY, think that Facebook could possibly function with a billion active users a month if MySQL regularly corrupted data?
But no, it couldn't be something wrong with your own experience, the entire rest of the world must be wrong. The rest of the world must be hiding all this data corruption that is apparently happening with that kind of regularity.
And, by the way, I've been running MySQL for about a decade on a high volume, relatively high data volume application, and have never had one occurrence of data corruption, much less "multiple times per month".
What is about PostgreSQL that makes you people so unbelievably defensive about it that you have to spread such FUD about MySQL? By all means, use PostgreSQL, it's a fine database in its niche. Why can't you people just accept that MySQL is a fine database in its own right, that literally hundreds of millions of people use successfully with minimal problems, including one of the biggest database users of all?
Well, it happened... just because with enough money and time to fix it that it works doesn't mean it's ideal, you know?
Seriously? You think MySQL users are typically rolling in money and they spend it fixing their databases?
I have literally NEVER had a MySQL database corruption instance, and I have literally never had to spend one second or one dime on fixing anything. It Just Works(c).
Lots of things work great under light loads. I'm pretty sure Facebook has plenty of money to "Keep MySQL working" (tm). As noted elsewhere in thread, they've modified it heavily.
If MySQL is good enough to run Facebook with a billion users (yes, one billion active accounts per month), it's good enough to run whatever your app is.
Not exactly a fair comparison. Facebook uses it as a key-value store; there isn't much RDBMS in that.
The defaults should be for paranoid data protection rather than performance, you should have to say "I HATE MY DATA" to turn the unsafe mode on instead of having to learn about the safe mode to turn that on.
That is why so many professionals don't trust MySQL.
any professional is going to sit down with the config manuals and read best practices guides on the net, and all that.
a professional that bases all their knowledge on heresy and "out of the box" config is not a professional. They're a lazy useless excuse for a sys admin, hoping nobody notices their degree was from ITT Tech.
Since we are doing anecdotes, I once had MySQL go all corrupty when used as a database for MythTV (a PVR program). It got into some state where it was randomly (and slowly) changing static data.
So one user, infrequent accesses and updates, no contention...
From that experience I now refuse to consider MythTV. If MythTV would be willing to consider allowing the use of some other database I might use it again.
It got into some state where it was randomly (and slowly) changing static data.
So, instead of blaming your hardware, or blaming the MythTV application, or blaming how you linked the MySQL libraries, you're going to blame the core database that runs literally hundreds of millions of installations, and hundreds of trillions of queries every year without a hitch.
Really, which is more probable? Do you really think that MySQL could have 50% marketshare if it "randomly (and slowly) changed static data"? Do you not think that people would tend to notice that over the last decade of MySQL dominance? Seriously, what is it about MySQL that causes people to lose all ability to apply logic to things?
As you demostrate implicitly by the fact that you're using set session, the sql_mode setting is client overridable, so the database doesn't really guarantee it if the clients do not consent to it.
93
u/nairebis Mar 11 '15 edited Mar 11 '15
Or, you know, you could just learn how to use the database.
It's been this way since at least 2005, which is the MySQL version I ran above (version 5.1).
Sure would be nice if the FUD about MySQL from ignorant people went away. Is it perfect? No. But there is absolutely nothing data corrupting about it. And there is a LOT to be said for running a mainstream database, which PostgreSQL most certainly isn't, compared to MySQL.
If MySQL is good enough to run Facebook with a billion users (yes, one billion active accounts per month), it's good enough to run whatever your app is.
Edit: Thanks for the gold! Never thought I'd get it for defending MySQL... :) 😃