TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why we're ending support for MySQL

397 pointsby bjokoalmost 6 years ago

18 comments

shanemhansenalmost 6 years ago
MySQL is a decent nosql option with mature replication. If you care about your data, expect MySQL to be your foe rather than your friend.<p>Do you expect your triggers to fire? You are SOL <a href="https:&#x2F;&#x2F;bugs.mysql.com&#x2F;bug.php?id=11472" rel="nofollow">https:&#x2F;&#x2F;bugs.mysql.com&#x2F;bug.php?id=11472</a><p>Do you expect to be able to insert utf8 into utf8 columns? Don&#x27;t be naive. Read the docs and you&#x27;ll discover utf8mb4 or as I like to refer to it: mysql_real_utf8.<p>How about transactions? Surely a real SQL database supports transactions right? Or at the very least if it doesn&#x27;t it would complain loudly when you use a transaction where not supported right? Once again this behavior is helpfully documented <a href="https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;8.0&#x2F;en&#x2F;commit.html" rel="nofollow">https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;8.0&#x2F;en&#x2F;commit.html</a><p>Do you expect to be able to put a value into MySQL and get that same value back out? You are SOL. But it&#x27;s documented.<p>I can honestly say that the only appropriate time to use MySQL is when you can&#x27;t use postgres and you are willing to move from a RDBMS to something that requires significantly more work to prevent data corruption.<p>I respect the hell out of MySQL engineers in terms of raw performance and the engineering of Innodb. I&#x27;m sure they aren&#x27;t happy there&#x27;s a million broken applications relying on defaults they can&#x27;t change. I&#x27;m sure they aren&#x27;t happy that fundamental limits in how pluggable storage engines work make ACID transactions not possible in the general case.<p>Postgres, for all of it&#x27;s issues, feels like a database that has your back.
评论 #20348598 未加载
评论 #20346547 未加载
评论 #20346804 未加载
评论 #20354339 未加载
评论 #20357667 未加载
评论 #20351187 未加载
评论 #20403228 未加载
deftnerdalmost 6 years ago
I mean, I&#x27;m not too upset that they&#x27;re focusing on one DB engine, but their reasons are a bit facetious.<p>&gt; There are lots of great use cases for MySQL, our specific needs just didn&#x27;t seem to be a good fit. Our use of MySQL had a number of limitations. In most cases, it wasn&#x27;t as simple as adding support to MySQL, but that by bending MySQL we typically broke PostgreSQL. To name a few limitations:<p>&gt; We can&#x27;t support nested groups with MySQL in a performant way<p>All they had to do was implement a nested set pattern for their groups [1]<p>&gt; We have to use hacks to increase limits on columns and this can lead to MySQL refusing to store data<p>A hack? Their DB creation schema specified a TEXT column when it should have been a LONGTEXT column. Using LONGTEXT is not a hack, it&#x27;s a choice when your data is more than 65535 characters, and they made the wrong choice out of ignorance.<p>&gt; MySQL can&#x27;t add TEXT type column without length specified<p>That&#x27;s just incorrect. What they MEANT to say is that they had a column to store filenames that was a varchar(255) column and people were running out of space with long directory paths and filenames. They could have moved to a TEXT column, but didn&#x27;t because they thought it couldn&#x27;t be indexed without specifying a length... But they were wrong, you CAN index a TEXT column without specifying the TEXT column length, you just have to specify the length of the substring you want to index.<p>Alternatively, since this is filepaths and filenames, they could have used a nested set pattern again and gotten 255 characters for each component of the path and a lot more feature options for their search system!<p>&gt; MySQL doesn&#x27;t support partial indexes<p>This is true, but is it really a show stopper?<p>&gt; As a side note – we don&#x27;t use MySQL ourselves<p>I think this is the real reason. They just didn&#x27;t have the necessary talent to implement the features correctly. Wrong schema specifications and not knowing to implement nested set patterns is a sign that they don&#x27;t have a knowledgeable DBA on staff.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nested_set_model" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nested_set_model</a>
评论 #20343549 未加载
评论 #20346092 未加载
评论 #20344893 未加载
评论 #20343830 未加载
评论 #20344610 未加载
评论 #20344575 未加载
评论 #20343808 未加载
评论 #20345528 未加载
评论 #20347027 未加载
评论 #20344616 未加载
评论 #20344053 未加载
评论 #20346880 未加载
评论 #20343929 未加载
评论 #20345762 未加载
评论 #20346003 未加载
评论 #20344702 未加载
评论 #20353958 未加载
评论 #20345147 未加载
评论 #20353713 未加载
评论 #20346565 未加载
评论 #20366688 未加载
评论 #20345999 未加载
评论 #20346832 未加载
评论 #20344519 未加载
评论 #20343537 未加载
noneeeedalmost 6 years ago
All their more general points in the post are perfectly valid arguments for focusing on a single database that I&#x27;ve heard from other projects, but naming specific technical issues like that actually makes it seam more nit-picky and less valid.<p>I&#x27;m not sure many people would have found anything to argue with them about if they had simply said &quot;Tagetting multiple DBs requires more resources to develop and test, limits our ability to make the most of what Postgres offers, and increases the cost of support. The proportion of users using MySQL is decreasing, so we have decided to focus on Postgres to give the maximum benefit to the largest group. We understand this may cause issues for some users so here is a comprehensive migration guide&#x2F;toolset&quot;.
评论 #20344818 未加载
rhackeralmost 6 years ago
I remember like 10 years ago it was all the rage to support 45 different databases. I&#x27;m so glad that time has passed. It wasn&#x27;t feasible. Yes you can orm the crap out of things so you never see a line of SQL but you end up with index tuning on multiple database platforms. I noticed the trend thankfully just sort of walked itself away about the time non-traditional databases entered the picture and well it was pretty much impossible to support Mongo and Mysql (reasonably). I&#x27;m assuming more things are going back to Mysql&#x2F;Postgres&#x2F;Sybase&#x2F;DB2 again, but I hope more companies and OSS projects stick to just one this time?<p>The bottom line argument is this: When you make the decision to support multiple databases think of the 10-20 years of changes your product will exist through (and possibly a lot longer) and realize how much extra work that is going to be even if you use ORM. Then if you come to the decision Gitlab is - are you going to want to write the porting software for your users or just let them be shit-out-of-luck?
mutt2016almost 6 years ago
Unpopular opinion, and anecdotal data point: I stopped using Solaris and MySQL when oracle took ownership.<p>Linux and postgres is my new standard.
评论 #20343936 未加载
评论 #20344474 未加载
评论 #20344518 未加载
评论 #20347019 未加载
评论 #20350312 未加载
lifeisstillgoodalmost 6 years ago
They just decided to use boring technology (<a href="http:&#x2F;&#x2F;boringtechnology.club&#x2F;" rel="nofollow">http:&#x2F;&#x2F;boringtechnology.club&#x2F;</a>). Given they have limited resource spreading it across two databases seems a miss, and taking that time and attention and putting it back into git-ty stuff looks like a win.
评论 #20346907 未加载
评论 #20347185 未加载
评论 #20352420 未加载
nickcwalmost 6 years ago
&gt; MySQL can&#x27;t add TEXT type column without length specified<p>Mysql does have a TEXT type with a max limit of 65536 chars (you can have MEDIUMTEXT or LONGTEXT if you want more).<p>You don&#x27;t supply a length when you use TEXT<p><a href="https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;8.0&#x2F;en&#x2F;blob.html" rel="nofollow">https:&#x2F;&#x2F;dev.mysql.com&#x2F;doc&#x2F;refman&#x2F;8.0&#x2F;en&#x2F;blob.html</a>
评论 #20344040 未加载
oarabbus_almost 6 years ago
Good, PostgreSQL is superior to MySQL in almost every way.
评论 #20347797 未加载
aeyesalmost 6 years ago
Why is such a major change implemented in a minor version?
评论 #20345425 未加载
评论 #20347202 未加载
ShakataGaNaialmost 6 years ago
Good for them. Both MySQL and PostgreSQL are Good^. But supporting both doesn&#x27;t work and it totally makes sense to focus on one. Personally, I don&#x27;t generally use PGSQL but my GitLab instance does. Why? It&#x27;s easy to run a dedicated PGSQL instance for GitLab using Docker. Or... Using AWS RDS. Or... Any number of ways.<p>(^ Good is relative. People have their opinions on which is subjectively better but at the end of the day, lots of big sites and applications use both options to great success.)
评论 #20348933 未加载
tbarbuglialmost 6 years ago
If you never used or heard of LATERAL [JOIN] I suggest checking that out because it is pretty awesome and handy.<p><a href="https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;current&#x2F;queries-table-expressions.html#QUERIES-LATERAL" rel="nofollow">https:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;current&#x2F;queries-table-expres...</a>
xenatoralmost 6 years ago
I think here can be a good place to share my story why I never use MySQL in my projects. Once I was working for the company where I was an architect for some new project. And we have few gigabytes of data from a few sources. But with plans to gather much more in the near future. I came up with some database structure for the first draft of the early stage of development. It was nether big nether complicated for my scale comparing to the other projects I was working before. Since I&#x27;m python expert I choose SQLAlchemy for ORM layer and use its features to create the initial database schema. Postgres was a natural choice for me and almost fit to my requirements. I was worried about performance in the future but decided that we always can optimize when we have something. As I said it was early stage and we were on the research stage.<p>Everything was smooth development-wise but the database was pretty slow since we most use desktop-grade computers for prototyping. 3 weeks before the first internal release owners ask me to change the database to MySQL. I was against this step, we don&#x27;t have time or resources for the experiments. But point was that company have MySQL experts that have more than 10 years of the optimization experience. I simply have no choice. They force me to do this against my will.<p>Since I wasn&#x27;t sure that in production we will use Postgres I don&#x27;t allow to use any special database dialect specific capabilities for the developers. And switching to another backend from Postgres to the MySQL was literally equal to a connection string change.<p>MySQL wasn&#x27;t ready to handle 40-60 tables and queries with 5-10 simple joins. On our data, every request just hang server (they quickly provided a server with a lot of memory and storage for this). A few days later we found that actually MySQL is working but the same simple queries run for 4 or more hours. So-called &quot;experts with 10 years of optimization&quot; spent a week trying to fix indexes and other things but it never happened.<p>After release, I left the company, because of the toxic atmosphere, but it is another story. But since that, I lost all my faith in MySQL. Maybe for others, it is an option but never for me.
评论 #20345481 未加载
评论 #20344663 未加载
avitzurelalmost 6 years ago
IMHO, this comes down to one thing. They lack the talent (and&#x2F;or the will&#x2F;resources to recruit it) to operate MySQL.<p>I can TOTALLY get the reasoning behind supporting only a single engine but the reasoning they write there are either wrong or misguiding.
评论 #20345242 未加载
评论 #20343780 未加载
just_mylesalmost 6 years ago
I have used postgres for so long that a lot of the baked in functions and features that were super convenient for me.<p>I recall wanting to change a data type in my query and having to actually use the cast function. Also it was mentioned but when I was using it CTEs were not implemented yet. However, they weren&#x27;t with postgres until 9.x as I recall either.<p>Regarding performance, I mean, that is as much design as it is rdbms choice. Also i&#x27;m no DBA.
js4everalmost 6 years ago
Just look how slow gitlab is on a 8cpu with 32gb or ram instance ... It&#x27;s crazy ! I&#x27;m not sure about which part is because of Rails or the way gitlab is implemented. Issue is not about MySQL but more about the lack of knowledge &#x2F; talent at gitlab
bdcravensalmost 6 years ago
Doesn’t removing support for something violate breadth over depth?<p><a href="https:&#x2F;&#x2F;about.gitlab.com&#x2F;company&#x2F;strategy&#x2F;#breadth-over-depth" rel="nofollow">https:&#x2F;&#x2F;about.gitlab.com&#x2F;company&#x2F;strategy&#x2F;#breadth-over-dept...</a>
评论 #20345924 未加载
mslaalmost 6 years ago
OK, but do they support MariaDB?
xvilkaalmost 6 years ago
Next step would be to rewrite everything from Ruby to Go (they already did for some parts of GitLab infrastructure).
评论 #20345574 未加载
评论 #20345420 未加载