Hi, Habr! This publication — attempt to dispel some popular myths and legends of MySQL. I was not mistaken with hub as the publication of Possibility of PostgreSQL which are not present in MySQL and vice versa from here was the cause for writing. The publication regarding criticism of MySQL though is imperfect, but is quite correct, and here comments to it direct at sad reflections.
Generally speaking, I was going to write the publication about opportunities of MySQL which are not implemented or implemented in PostgreSQL worse. But not to stir many subjects in one publication, and considering quite hard work on comparison of that I know very well (MySQL) that I know very badly (PostgreSQL), I have decided to postpone such publication for later and for a start to answer immediately many comments from the publication varanio.
Why for me it is necessary? Well, first, on the Internet again someone is not right. What is the problem is small, but unfortunately I should meet many of these cool stories not only on the Internet, but also to hear at different Russian conferences, including at elite conferences from elite speakers. It is especially strange to hear not quite correct statements about MySQL from representatives of the Postgres Professional company to which I treat with big sympathy and I wish it various success and prosperity. Therefore within cultural exchange and for increase of technological level of discussion about merits and demerits of PostgreSQL and MySQL, I for a start would like not only to sort typical delusions, but also to offer the correct formulations, and also to outline problems really serious (in my opinion) in MySQL at the moment.
So, school of young holivorshchik. Lesson first: "We criticize MySQL competently". Dzyn!
How MySQL do not need to criticize?
Let's begin with the simplest myths: okolotekhnichesky.
"MySQL — is legacy"
I will simply provide the short and not complete list all of the known companies where MySQL plays key roles in infrastructure and business: Github, Wikipedia, Google, Facebook, Twitter, LinkedIn, Alibaba, Taobao, Booking.com, AirBnB, Dropbox, Pinterest, GroupOn, Yelp.
I know that there are large and known projects on PostgreSQL. But, first, very few people can be compared in terms of the scope of to the specified projects. And secondly, it is simply useful to remember this list not to lose touch with reality when someone gives out something thoughtful in MySQL is not necessary style.
"MySQL have no community!"
It is possible to argue on criteria of assessment of scales and activity of community long, but criteria in http://db-engines.com/en/ranking to me seem quite reasonable.
On the other hand in Russia popularity of PostgreSQL and activity of community it is valid slightly above the "average world" trends. Not absolutely I understand, than it is caused, but I do not see in it anything bad.
"MySQL have community, but it is fragmented!"
In general could never understand, about what here the speech. It sounds as if users of Oracle MySQL need to be retrained completely to work with MariaDB. Or DBA working with MariaDB absolutely nothing knows about Percona Server. In reality of 99% of skills, books, articles, the utilities received somewhere councils and so forth it is possible to use quietly on any MySQL option.
"At MySQL there are a lot of forok and they have disorder"
For the first time strange statements I have heard this a few years ago on one of the Russian conferences. Since then I quite often hear it from the people who are obviously badly representing about what they speak. Including in the mentioned varanio post. I could never receive distinct answers to two simple questions:
- In what "disorder" consists?
- How many MySQL "forok" you can count?
It was not succeeded to receive distinct answers and this time, but I and already not especially also hoped. In development of free and open source software of "forka" meet pretty often. Thus usually it is considered that it is good, for this purpose it free and open. Besides, MySQL even have less than "forok" and "brunches", than in many other known projects. It is less, than in PostgreSQL, time has gone to that.
By the way, this argument is amazingly similar to FUD from Microsoft. Here so Microsoft advertized the advantage over Linux in the beginnings of this century:
"MySQL belongs to Oracle (and PostgreSQL to anybody)"
It, of course, correct, but what important conclusions from this it is possible to draw, I not really understand, and flight of thought of critics usually on it stops.
Purely theoretically, Oracle has the right to contract the project / to close source codes / to make it paid. As far as it is real — everyone can solve itself. On me it is so absolutely unreal — it was possible to be afraid of it at the time of purchase of Sun Microsystems by Orakl, but has passed 5 years (Karl!) and during this time MySQL developed quicker, than ever before purchase. Besides, in Oracle not fools sit and there perfectly understand that closing of MySQL will most of all strike on Oracle.
"Less bugs are subjective in PostgreSQL"
It can so and is, but as if here to compare objectively at absence tracker bug in PostgreSQL?
On it with nontechnical myths it is finished and we pass to more informative.
"PostgreSQL many times quicker MySQL"
I am engaged many years in code optimization of MySQL and, as a result, I take often load tests, the truth generally between different the version and MySQL options. Here that I can tell concerning such statements: I am absolutely sure that there are loadings/requests/configuration where PostgreSQL will work many times quicker than MySQL, the same as I am sure and in the return — there are loadings/requests/configuration in which MySQL will appear many times quicker than PostgreSQL. In case with MySQL there is one more important criterion — the used engine (storage engine) which too can change situation not only many times, but also to orders.
Every time when someone complains of proizoditelnost (not very well, MySQL or PostgreSQL), ask to show it scheme/requests/explain/configuration. And it is not accidental — all talk on productivity can be carried on only in such context. The general statements are not quoted.
"Replication in PostgreSQL is made on mind. And in MySQL is not present"
In MySQL logical replication is implemented (irrespective of statement-based or row-based of formats). In PostgreSQL replication physical (not "binary", namely physical).
Each approach has pluses and minuses. Even it is not necessary to be the specialist in this or that DBMS that to understand it. Users of MySQL have saved up wide experience of bypass or smoothing of negative effects from logical replication, but most likely sometime will appear also physical because in general it is necessary both that and another. I suspect that to PostgreSQL there is similar process, but in the opposite direction.
This subject very extensive also causes so many questions that I think of separate post.
"MySQL not strictly works with data"
Options: "MySQL vtikhy divides into zero!"
Technically correct, but boring version of this statement sounds so: "In MySQL of versions < 5.7 нужно не забыть включить правильные a href="https://dev.mysql.com/doc/refman/5.6/en/sql-mode.htm">the SQL modes
This article is a translation of the original post at habrahabr.ru/post/268949/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: email@example.com.
We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.