Most SQL books teach you how to write a query. SQL Performance Explained by Markus Winand teaches you how to write a query that stays fast when your table grows from a thousand rows to fifty million. It’s a short book with an outsized reputation, and it’s the first title we recommend to anyone whose queries are getting slow.
Here’s what’s inside, who it’s for, and whether it’s worth buying when the same material is free online.
Disclosure: some links on this page are affiliate links. If you buy through them, SimplifyDatabase may earn a small commission at no extra cost to you. It helps keep the site free.

At a Glance
| Detail | Info |
|---|---|
| Author | Markus Winand |
| Published | Self-published (first edition 2012) |
| Length | Around 200 pages |
| Databases covered | Oracle, SQL Server, MySQL and PostgreSQL |
| Level | Intermediate (you should know basic SQL) |
| Verdict | The clearest book on indexing ever written |
The Big Idea
Winand’s argument is simple: most performance problems are caused by bad indexing, and indexing is the developer’s job, not just the DBA’s. Developers know how the data will be queried, so they’re in the best position to design the right indexes. The book gives them the knowledge to do it.
What the Book Covers
- Anatomy of an index: how a B-tree is built, what the leaf nodes contain, and why a lookup is fast.
- The WHERE clause: equality vs range conditions, concatenated (multi-column) indexes and why column order matters, functions on columns, parameterised queries,
LIKEpatterns andNULLs. - Performance and scalability: how data volume and system load affect response time, and why “add more hardware” rarely fixes a missing index.
- Joins: nested loops, hash joins and sort-merge joins, and how indexes support each one.
- Clustering data: index-only scans, covering indexes and clustered indexes (index-organised tables).
- Sorting and grouping: how an index can remove the need for a sort operation.
- Partial results: fast top-N queries and efficient paging.
- Modifying data: the cost of indexes on
INSERT,UPDATEandDELETE. - Appendix: how to get and read execution plans in each database.
What I Like
1. It’s short and focused. No padding. Every chapter answers one practical question, and you can read the whole book in a few evenings.
2. It works for every major database. Examples are shown for Oracle, SQL Server, MySQL and PostgreSQL, so the lessons transfer if you change jobs.
3. It explains the mechanism, not just the rule. Instead of “don’t use functions in WHERE”, you learn why: the index is sorted by the column’s value, not the function’s result. Once you see that, you can solve new problems on your own.
4. The free online version. The full content is available on Winand’s site, Use The Index, Luke. You can try it before you buy.
What Could Be Better
- The printed book is from 2012. The core ideas are timeless, but newer features (like columnstore indexes in SQL Server) aren’t covered.
- It’s not a SQL Server tuning manual. There’s nothing on Query Store, wait statistics or server configuration.
- Diagrams are functional, not pretty. It’s a self-published book, and the layout is plain.
Free Online or Paid Book?
The website is great for looking things up. The book is better for reading start to finish: the chapters build on each other, and it’s easier to focus away from a screen. Buying it also supports the author who made the free version possible. If you’re on a tight budget, the free version is a perfectly good way to learn.
Should You Buy It?
Yes, if you write queries for applications or reports and you’ve ever wondered why a query is slow, or why SQL Server ignored your index.
Not yet, if you’re still learning SELECT and JOIN. Start with our beginner SQL books and come back in a few months.
Our verdict: If you only ever read one book about database performance, make it this one.
Practise What You Learn
Winand’s ideas match the real cases in our performance series. Try SQL indexes explained simply, index seek vs index scan (which covers functions on columns and implicit conversion), and the full SQL Server performance troubleshooting guide.
When you’re ready for SQL Server specifics, see our list of the 5 best SQL performance tuning books, or browse more book reviews.