Readit News logoReadit News
nubinetwork · 3 months ago
Why isn't this being upstreamed? I don't feel comfortable using some random patch someone found on github...
voodoo_child · 3 months ago
One of the big problems is Oracle decide what does/doesn’t go in. Understandable, but they provide no insight into the decision making process, why patches don’t get merged, or even if/when they take it. They used to post worklogs for features they were working on which gave some insights, but they’ve stopped doing that now too. Imagine working on a new feature for months, submitting a patch only to find out oracle have went their own route, many people will just say what’s the point. Last updated work log was in 2021: https://dev.mysql.com/worklog/

Edit: As an example, one of the optimizations called out in this repo was submitted in October 2023. “Thank you for the report and contribution.” and then radio silence ever since.

https://bugs.mysql.com/bug.php?id=112737https://www.percona.com/blog/what-oracle-missed-we-fixed-mor...

arp242 · 3 months ago
From FAQ:

16. Why aren't these improvements merged into the official MySQL?

Optimizations have been recommended to the official team and have received acknowledgment. However, they are assigned low priority in official bug fixes. Simple optimizations may take considerable time to be integrated, while complex ones might never be implemented.

As a result, the decision was made to open-source the MySQL optimized version to ensure effective application in high-end scenarios.

erulabs · 3 months ago
Sort of wild that a small improvement to relay log processing could almost certainly offset one’s entire lifetime of carbon. I mean, I’m genuinely happier with a tiny latency reduction but it’s still wild the scale at which MySQL operates.

Maybe these optimizations can let me avoid moving to Vitess for another year!

3cats-in-a-coat · 3 months ago
Keep in mind optimization effects can be counter-intuitive, as you need to consider unexpected second-order effects. Say what if my queries being slow forced me into optimizing them via cache that I wouldn't use otherwise, resulting in 10x improvement, but if MySQL is a bit faster I would've reached my initial performance goals without that cache, thus increasing the total carbon footprint?

And if this sounds contrived, this is basically what happened with our hardware vs. software optimization situation. We could do wonders on a 1MHz chip with 2MB of RAM in the 1980s, but now we need literally many thousands of times that capacity just to boot our OS to an empty screen.

Every time hardware improved, software bloated up. Thus eventually we had so much disposable compute just for... again, literally... playing games and crypto scams, that we invented AI running on it. And now that AI is once again blowing up our energy needs.

All that, because hardware kept optimizing, software kept compensating by becoming worse, and thus new use cases revealed themselves that would be impossible before, but rather destructive to climate.

jcgl · 3 months ago
I would say that this is basically an example of the Jevons Paradox: https://en.m.wikipedia.org/wiki/Jevons_paradox

Having a cheaper, more available resource increases overall utilization of that resource.

ksec · 3 months ago
>Maybe these optimizations can let me avoid moving to Vitess for another year!

Any reason why considering Vitess isn't exactly new and has been stable enough? Other than no need to introduce additional complexity unless absolutely necessary.

vasvir · 3 months ago
Question: Does any of this optimizations apply to MariaDB?
iforgotpassword · 3 months ago
Was wondering the same. Such a verbose readme and not a single mention of MariaDB.

I know it's moving slower and in a lot of ways it's inferior to mysql, but at the same time that would make it even better to have some contributions like this.

vasvir · 3 months ago
That's not my impression. MariaDB looks to me that it has greater development velocity than MySQL.

Do not know about speed difference divergence though. I guess a speed run down would be interesting...

femiagbabiaka · 3 months ago
Is there somewhere I could read about the JOIN performance degradation in detail?

EDIT: I missed that the authors wrote a GitHub book, including some descriptions of the problem(s): https://enhancedformysql.github.io/The-Art-of-Problem-Solvin...

Side note: One downside of ChatGPT generated documentation (assuming this was written in conjunction with an LLM) is that humans tend to be a little less verbose.

ksec · 3 months ago
I have been trying to Submit MySQL news to HN but never reached the front page.

After how many years they have finally released 9.0 and are now at 9.3. I wonder how many of problem stated in the list is still true.

At least Vitess still get continuous development.

mdaniel · 3 months ago
> 14.7MB

You know, a patch file can individually address each upsteam file it intends to modify, right? I presume someone who wants to casually read them would need to fork the repo, cut up the ginormous .patch file into the 2361 individual patches for ease of reading or deep-linking

I also just for-real don't understand how in the universe a ~15MB text file against an open source _git hosted_ project is a sane way of delivering value. Not a single time in the readme did they say why $(git diff origin/tags/8.0.42...HEAD > yolo.patch) was the chosen delivery mechanism

throwdbaaway · 3 months ago
mdaniel · 3 months ago
Well, if Google does it then I guess I stand corrected about it being a weirdo way to deliver patches. They went so far as to .gz theirs, too, for extra non-browsing by mere mortals.

I find it curious that <https://github.com/google/mysql-tools/blob/02d18542735a528c4...> and yet <https://github.com/google/mysql-tools/blob/02d18542735a528c4...> says "diff -ruN base/client/mysqldump.c mysql40gpl/client/mysqldump.c"

I had no idea one could release patches of GPL software under an Apache license. That makes my head hurt.

fipar · 3 months ago
MySQL is available in GitHub (so in that sense hosted) but development doesn’t happen there. Not saying that’s the reason for the delivery mechanism though.
lmz · 3 months ago
Patches to MySQL are nothing new, but who's behind this patch set?
wejick · 3 months ago
He is actually quite active on X, and writing his book [1] on the journey. I actually enjoy his insights too many time than I'd want.

[1] https://github.com/enhancedformysql/The-Art-of-Problem-Solvi...

santa_boy · 3 months ago
Curious, Is there an easy way to do row-level and field-level security in MySQL?
fipar · 3 months ago
Field-level is just column privileges. Row-level, I think you can only achieve that with views, which is less than ideal.
bawolff · 3 months ago
Views?
user32489318 · 3 months ago
I guess he meant to create a view of a table with “where” conditions depend on your user privileges