‘High Performance MySQL 4ed’ notes and review
DB-related knowledge in the current age seems to be polarized. On the one hand, ORMs’ (and other similar solutions) creators are trying to abstract away as much possible. On the other hand – we have very specific use cases, where in-depth knowledge of DB configuration and performance is crucial. ‘High Performance MySQL’ is a book, which tries to seal the gap between these two.
What we must start with, is a small disclaimer. You may have noticed, that I’m always pointing out that it’s the fourth edition of the book. That is on purpose. Not that there are newer versions available, but rather to keep in mind, that the book contents (and the authors too), has come a long way, since its first edition. Therefore the contents was changed a couple of times, adjusted to be of more use for the reader. It’s not just a marketing slogan – while reading, you can tell quite often, that the authors has been around for quite some time. Many suggestions and tips in the book, build on the experience – especially in a matter of practical tips about performance, and figuring stuff out. In my opinion – that’s the main value of the book.
Going back to the review part. In the introduction I’ve mentioned two separate kinds of DB users. Of course, this picture is simplistic, but in my experience quite sufficiently describes the reality. However, obviously there’s a spectrum here, not a clear 50:50 division. In my case – programmer who is seen as a senior – sometimes playing the role of an architect, I’m more inclined to be around DBAs or DevOps in my everyday work. Therefore, as maybe I’m not going to tweak low-level MySQL service settings myself, it is advised to at least have a clue, what can be tweaked and how.
Usually we can find some grey area in software delivery – somewhere between DB or schema config, and all the layers from there to the application. Pooling settings, networking along the way, performance of the queries/indexes (more or less influenced by the automatic tools). When troubles arise, a typical “it’s not my area” discussion starts. I don’t want to go further in terms of office politics. However, users of the MySQL (or DBs in general), can le left in the dark at this point. Application behaves strangely, throwing errors or timeouts, but DBAs do not see a trouble at their side. Second scenario is also possible – DBAs see something as a potential risk, and programmers don’t want to change a thing, because ‘it just works’.
To remedy these kinds of situations, the reviewed book is a first step. When it comes to MySQL, we’re talking a product that has been around for a while. The potential for breaking things, but also making them better is huge. However, as in the aforementioned scenario – if you have production on fire, or you’re surprised with the upcoming DB-config change, you don’t have time to get your PhD in MySQL.
That’s where ‘High Performance MySQL’ comes to the rescue. The overall concept of the book resolves around giving the basic tools and vocabulary, to know what is possible and what is not. Whether we should be even considering changes in a specific areas, or just let it be. You won’t find deep-dive into MySQL internals, but sufficient-enough knowledge, that can help you make MySQL usage easier. Organised into chapters covering basic config, replication, performance and other stuff – can be a reference for investigating specific topics. Self-contained, just waiting for you to start reading.
From my perspective, the amount of knowledge and its depth is sufficient. Chapters are quite concise, yet informative. They may sometimes cover areas, which are not that much of use for a client of the MySQL service, but they’re still worth reading – just for pure fun (hardware concepts/backups). The only thing that I think could be improved in the book, is giving even a very small explanation of the basic concepts. Authors assume that the readers have some knowledge already, which is fine. However, they also quite often mention that “it’s not like in Oracle/other DBs” when it comes to MySQL. Building on that I may add – there is also a possibility, that the readers may think, that the specific concept looks like A in every DB, but it’s actually not. Putting some introductory remarks (even in the footnotes), could set the stage right from the beginning.
Do I recommend this book in general? Yes, and yes. If you find yourself in the situations, where some more advanced knowledge how MySQL works is needed – don’t hesitate. Obviously, if we’re not repeating, the knowledge may fade. To prevent that from happening, I’ve created notes that I’ve made during reading. They’re not there for preventing you from reading the book – they’re more as a bullet-points, to refresh the memory. Like all the other notes I’ve made – you can find them on my GitHub.
Leave a Reply
You must be logged in to post a comment.