OK, I admit it. I really, really like SQL. I know that makes me a little weird; SQL just isn't cool.
But it is.
First, SQL is A Domain Specific Language, and I love DSLs, because a good DSL lets you focus on the domain and forget about the details. Second, SQL is (mostly) declarative. You don't tell it what to do; you tell it the result you want. And, of course, SQL is based on an incredibly solid foundation (set theory) which means it is way more flexible than it might first appear.
Having said all that, SQL can be a serious pain in the ass. Often, the pain comes from performance problems. Stuff works great in staging, but stick it into production and give it a year, and your app starts to slow down. I've had some systems where that slowdown was dramatic and happened seemingly overnight.
That's why Bill's second SQL Antipatterns book is so great: it focuses on just performance. Each chapter starts with a story, and each story is totally relatable, because it will have happened to all of us at some point. We store quarterly summaries in a separate table because querying the transaction table was too slow, and accounting found out that the numbers disagree. We're showing paginated data, but now there are a million rows in the table, the "go to last" button is killing our servers. The servers are polling a table looking for more data, but when Kubernetes autoscales us up, the database goes down.
What follows each story is an amazing dive into both what's going wrong and alternatives for fixing it. And that's where the book shines. It isn't just about solving a particular set of problems, but rather it's a deep dive into many different aspects of database design and use. I've been using SQL databases for many decades, and I learned a whole bunch from reading this book, from better ways of doing pagination (hint, offset/limit is not the way) to the fact that you can define indexes on the result of applying functions to columns.
The book is also a really easy read; I've been working on getting it ready for beta, and keep finding myself just reading rather than tweaking markup or scaling figures.
If you use SQL (and you probably do), I'd strongly recommend More SQL Antipatterns. It will up your game, and you'll enjoy the process.