Anecdata: was asked by a client why the same query was running orders slower on our infrastructure (IaaS on Xeons) than on their test server (a regular desktop with i7). I check the load, IO, yada-yada and I don't see anything what could indicate the slowness. After a bit I check the db size and ... I'm pretty speechless, because it is 77MBs. 77 megabytes and the query runs for tens of seconds. I tell the client to give me the query. They are happily oblige and provide a two FullHD screens of SQL with like... 20? More? 'SELECT *' from the same tables on and on.
After speaking nicely with the client about the origins of this query and checking their dev environment, I learned:
1. this query was autogenerated by Lavarel
2. their dev environment is 100 times smaller than the prod
3. until I forced them to copy prod data to dev they didn't believe the problem was with the query
4. between two programmers and one sysadmin on the client side NOBODY was even close to reasons of slowness.
So... for some people SQL in 2022 is pretty equal to punchcards.
My first dev job about 15 years ago I took over this in-house developed intranet. Some queries took quite long (30 to 60 seconds), and according to "the last guy" there wasn't any way to speed it up. At the time I didn't know anything about SQL (literally never used it before), but I figured there really had to be some way to do this faster. I just read some basic documentation, rewrote a few queries, and now I got the exact same results in 1 to 2 seconds. A few months later after I learned a bit more about SQL and optimized it further (just by adding an index IIRC) and now it was fast enough to appear instantaneous.
I'm still far from an SQL expert, and certainly wasn't 15 years ago, but you can get a lot of win by just spending as little as one or two days learning about SQL. It really surprises me how some people don't.
Then again, for a very long time I thought awk was basically useless to learn, until I did last year after which I kicked myself for not learning it sooner as I had spent a ridiculous amount of time cooking up inferior solutions for ~20 years, and spending just an hour or two learning awk would have been a great ROI *shrug*.
I guess the moral of the story is that you can never be quite sure if something is useful or useless until you actually learn it.
With the rise of ORMS, I'm coming across more and more devs in my work that have no idea how to write performant SQL, and don't ever check to see what gets generated and run "behind the scenes"