90

I have to let it out. It's been brewing for years now.

Why does MySQL still exist?

Really, WHY?!
It was lousy as hell 8 years ago, and since then it hasn't changed one bit. Why do people use it?

First off, it doesn't conform to standards, allowing you to aggregate without explicitly grouping, in which case you get god knows what type of shit in there, and then everybody asks why the numbers are so weird.

Second... it's $(CURRENT_YEAR) for fucks sake! This is the time of large data sets and complex requirements from those data sets. Just an hour through SO will show you dozens of poor people trying to do with MySQL what MySQL just can't do because it's stupid.

Recursion? 4 lines in any other large RDBMS, and tough luck in MySQL. So what next? Are you supposed to use Lemograph alongside MySQL just because you don't know that PostgreSQL is free and super fast?

Window functions to mix rows and do neat stuff? Naaah, who the hell needs that, right? Who needs to find the products ordered by the customer with the biggest order anyway? Oh you need that actually? Well you should write 3-4 queries, nest them in an incredibly fucked up way, summon a demon and feed it the first menstrual blood of your virgin daughter.

There used to be some excuses in the past "but but but, shared hosting only has MySQL". Which was wrong by the way. This was true only for big hosting names, and for people who didn't bother searching for alternatives. And now it's even better, since VPS and PaaS solutions are now available at prices lower than shared hosting, which give you better speed, performance and stability than shared hosting ever did.

"But but but Wordpress uses MySQL" - well then kill it! There are other platforms out there, that aren't just outrageously horrible on the inside and outside. Wordpress is crap, and work on it pays crap. Learn Laravel, Symfony, Zend, or even Drupal. You'll be able to create much more value than those shitty Wordpress sites that nobody ever visits or pay money on.

"But but but my client wants some static pages presented beside their online shop" - so why use Wordpress then? Static pages are static pages. Whip up a basic MVC set-up in literally any framework out there, avoid MySQL, include a basic ACL package for that framework, create a controller where you add a CKEditor to edit page content, and stick a nice template from themeforest for that page and be done with that shit! Save the mock-up for later use if you do that stuff often. Or if you're lazy to even do that, then take up Drupal.

But sure, this is going a bit over the scope. I actually don't care where you insert content for your few pages. It can be a JSON file for all I care. But if I catch you doing an e-commerce solution, or anything else than just text storage, on MySQL, I'll literally start re-assessing your ability to think rationally.

Comments
  • 27
    But but... I only know mysql😭
  • 3
    @andri9up lol :) it's the same thing elsewhere, except better, with more stuff to explore and use.
  • 4
    I like cartography and geographical information.

    Postgres + GIS made me realize how limited MySQL is. Not just because of the awesome stuff you can do with GIS, but I feel so handicapped without CTEs.

    MySQL is improving, but it still feels like: too little too late.
  • 2
    So what are other recommended options? I see postgresql or whatever it's called being praised, anything else?

    Still very new to this but I started with MariaDB.
  • 7
    @Florens MariaDB is the same as MySQL. Very few differences. It's good for storing data, but very bad for querying it.

    PostgreSQL is awesome. It's fast, it's big, and it's everywhere. It has a ton of a-fucking-mazing functionality, and lots of stuff that you can do by including extensions. It's available on numerous platforms like Amazon RDS, and Amazon actually made a similar thing to it and called it RedShift, which is now available as their flagship RDBMS solution. And it's improving very fast. Always new features to make it even better, even faster. You can store JSON there, in binary if you want, and index it, and its keys, so you can query based on JSON content if you want, and it will be blazingly fast. You can .. uh, everything. You can even use JavaScript inside PostgreSQL to program stuff. Truly amazing.
    Where it sucks however is flexibility when linking all of these languages together with other queries. And that's where Microsoft SQL Server shines. But that's in the next p
  • 5
    @Florens so now about Microsoft SQL Server.

    They're now on Linux! Yay!

    Is it free? Probably not. But since you're paying for PaaS anyway (Amazon RedShift for example), you might as well pay the same for Azure.

    So why is it good?
    Well, it's the fastest of any of the alternatives, especially when it comes to huge rows (tables with 100 columns or such). It's also very fast, as it often neglects the user's idiocy (by not having an index on a 5 million row table before querying it), and performs fast anyway. The best part of Microsoft SQL Server is that its language T-SQL integrates very well with SQL. You can declare a variable anywhere you want, use it, assign it, and output dynamic data sets without any issue. That's why it's also quite easy to make pivot tables in T-SQL, which you can't do in other systems. It's also extensible, using CRL assemblies.
    Where it sucks is on basic functionality. Much poorer than PostgreSQL.
  • 1
    @apisarenco Woah, thanks so much for this explanation.
  • 3
    Never had problems with MySQL. Then again never had the chance to build any complex applications that TS mentioned.
  • 0
    @chasb96 Well that was the question: why do people still use it? There are only a handful of RDBMS out there that are worse than MySQL, and you've surely never heard of them.
  • 0
    MySQL suffers the same rant as PHP being a shitty DB. But like PHP it depends on the user. MySQL can be pretty much powerful if well optimized and running on a good environment. I have created financial systems running on the good old MySQL which has proven the database reliable. You are not providing reliable facts on why MySQL sucks and why a suitable alternative is needed.
  • 1
    @allankibet i have. Read again.
    Write back when mysql deserves "sql" in it by supporting standard sql,
    Like full outer joins, proper aggregation and group by, proper null handling in least and greatest functions, that doesn't change (breaking stuff) in a minor version. It's also slow.

    Want fast? Go Postgresql, MSSQL. Mysql shouldn't even exist. It was never the best in any segment, and is now one of the worst in existence.
Add Comment