SQL Performance explained

I just finished reading SQL Performance Explained, by Markus Winand. This book, which is available for free in a web version at Use the Index, Luke!, is absolutely a service to the development community, and from the moment I started reading it, I could not put it down.

First of all, the book is concise and down to the point. No useless introductions, no working around it – goes straight to what it needs to explain.

Second, it is given publicly, for free, in a web version that is very easy to read.

Third of all, the contents are generic enough so that it applies to every database engine, and the book covers specifics for MySQL, SQL Server, Oracle DB2 and, PostgreSQL. There’s even a whole chapter dedicated to DB2’s treatment of NULLs, which is not intuitive at all.

As for the contents, the book does something which, to me, is essential to any book that wants to stay in the minds of readers. It starts by explaining, in a very understandable tone, what indexes are and how they work. With that foundation, it starts building on the performance improvements that it brings, and the limitations that they have.

Such structure is perfect because the progression allows you as a reader to retain the important concepts – easily re-discovering them in your head if you need to. And when you need specifics, it still allows you to find them quickly in the book, making it into a great balance between a reference book and an introductory book.

I absolutely recommend it, for anyone interested in dealing with relational databases and what approaches they can take to optimize their operations.