SQL Server Query Tuning and Optimization
This is my second post about my experiences as a writer and here I cover my second book, SQL Server Query Tuning and Optimization, including its latest edition published recently and updated to SQL Server 2022.
So this far I had published a book about the SQL Server query optimizer with Red Gate. But now I wanted to write a book about query tuning and optimization. I worked as technical editor of a book including a similar topic for Kalen Delaney. This book was one of four books of the Inside SQL Server 2005 series. I remember Chapter 3 of this book, "Query Execution" by Craig Freedman, was incredible. I wanted to write a book extending what Craig did on that chapter. In addition, I would add internals and undocumented information about the query engine and the query optimizer, something that Craig, as a Microsoft employee, probably was not allowed or not willing to write about.
In addition, although my query optimizer book was extremely well received, some of the feedback I was getting is that it was very technical or even like at academic level, and not much practical. I got that feedback on several ways including book reviews or while presenting about the topic in conferences. Well, what can you expect with a book with a title "Inside the SQL Query Optimizer"?
McGraw-Hill
Even when I always have had a great relationship with Red Gate, for some reason this time I wanted to try the traditional publishing and distribution way.
A usual contract with Red Gate was like this. After publication, a book was exclusively available for purchase at Amazon or any other site for a specific time, I think in my case was six months. After those six months, Red Gate would offer the book for free as a download on their website and also would offer printed copies at SQL Server conferences and other technology events. Of course there was an economical compensation about your books given away for free. Since Red Gate is a software company, their goal was to give book away for free so people can also learn about the company and download and try their software. Obviously the printed version was still being sold on Amazon or other sites for people who could not attend those events. Interestingly, the electronic version of the book is still being purchased even as of today when it is legally available for free. Well, nothing under my control.
So the first thing to do about this new book was to find a publisher. I don't remember if I contacted one or more publishers. As I mentioned earlier, I have backups of e-mails which I could use to get more details if needed. Long story short McGraw-Hill agreed to publish my book. I remember I used to read all those amazing McGraw-Hill books when I was a kid at school. So it was incredible for me that I eventually became a McGraw-Hill author.
The McGraw-Hill distribution was amazing too. I could see my books physically available at bookstores, not just online. So I used to go to Barnes and Noble stores and see my books available for purchase. It was amazing. No lines of people buying my books LOL but still cool.
I don't pretend to compare Red Gate to McGraw-Hill. One is a software company and the other a publisher. So working on this book was different than working with Red Gate. The team at McGraw-Hill was very professional and I remember we just worked hard to finish the book. One thing I liked was that I got total control of the project. I did everything exactly how I wanted. Sometimes with other publishers, as I would learned in the future, you have to fight for some even small items. Not surprisingly, something I could not change was the book cover. As I saw with many publishers, they usually have a theme on the covers and obviously you can not change that. Yes, you can ask for as many possible covers to choose as you like, but they have to follow the theme.
I was very proud of the final book as it was very solid and complete. It covered everything it needed it to cover. It covered SQL Server internals and it was very practical too. The book was extremely well received. It was voted #1 on one or two independent surveys including one published by Red Gate (a reminder my book was not with Red Gate anymore). I was happy to see my book at SQL Server events too, including the bookstore at the PASS Summit .
Translations
I was browsing the Internet one day and discovered that the book has been translated to Polish. Wow, although I was very happy to learn this, my first impression is why nobody told me anything about it. I talked to my contact at McGraw-Hill and found out everything was perfectly fine. Translations are clearly specified on my contract. Obviously I remember reading my contract before signing but probably do not remember that part. Also, royalties for translations are included in my quarterly royalty statement which probably I did not read either. Anyway, I was very happy my book was translated to another language. I also contacted the Polish publisher for copies and they said will send me some. To this day I haven't seen anything on the mail yet LOL. I would visit Poland for a SQL Server conference a few years later.
Recommended by LinkedIn
There was also a special edition of my book for the Indian market. The cover said Indian edition and specified "For sale in India, Pakistan, Nepal, Bangladesh, Sri Lanka & Bhutan only".
Second edition
Even when I believed my book was very solid and complete, obviously over the years it required an update. The book was still very strong for later versions. Unfortunately it had the "2014" in the name and perhaps readers were looking for books for latest versions of SQL Server.
I wanted to update the book since probably 2017 but a couple of other book projects got on the way. I wrote a book about Linux for the SQL Server 2017 release, also for McGraw-Hill. And I wrote a second edition of my High Performance book for the SQL Server 2019 release. I will cover these two books in the next two posts. I wanted to do the second edition update before the High Performance book but Apress was pressing me to do their book first.
New Publisher
When I was finally ready to work on the second edition of the book I contacted McGraw-Hill. It has been several years since the first edition and it seems like McGraw-Hill had now a different marketing goal. The told me something like they are not doing new titles on SQL Server and may only focus on information technology certification books. Long story short they were not interested in a second edition.
But since they owned the publishing rights of my book, you can not just go and offer the book to a second publisher. Unless you are willing to write the entire book from scratch. But McGraw-Hill were so very nice and agreed to give me publishing rights back so I can legally offer the book to a second publisher. This process includes a reversion of rights document which I got signed by the McGraw-Hill president. McGraw-Hill was always professional and perfect. I surely will miss working with them.
Packt Publishing
Since I had recently published two books with Apress, the logical step was to offer my new book to them. Apress was immediately interested but we had a clash with the book title. So they were perfectly fine with the content of the book, nothing will be changed, but they wanted to change the book title. They said the title was very similar to a Grant Fritchey's title. Apress offered me the following two titles, "Troubleshooting SQL Server Query Performance" and "SQL Server Query Optimizer Internals and Performance", or to choose something else. I told them my book covered query tuning and optimization and I didn't want to change the title of the book. Like they say, my way or the highway. So we went separate ways.
Without McGraw-Hill and Apress, it looks like I was running short of options. There are only a handful of publishers working with SQL Server titles. Long story short Packt agreed to publish the second edition of my book. However, although they were perfectly fine with the content and the title of the book, they could not release it as a second edition. It was their first edition after all. Not a big deal.
I started working on the second edition working with SQL Server 2019. When SQL Server 2022 was announced I took the opportunity to update it to this latest release. The book has new chapters and was totally updated for SQL Server 2022. The second edition of the book was released on August 12, 2022.
Finally, this time I had more control on the book cover as their new theme allowed to have any picture you wanted. I always wanted to have something rock and roll related and the idea of a crowd in a rock concert was my first choice. Thus this is what I have in the cover of the book.
Congratulations Benjamin! Your books are always very, very deep and full of highly technical details. I love your books! Now, I’ll go buy this SQL 2022 version. Your first edition is SO good. Thanks for the hard work writing books.