SQL Performance ExplainedMarkus Winand

SQL Performance Explained

by Markus Winand · first published 2011

34mentions
26recommended by
28HN commenters
2014–2025first – last mentioned

93% recommend7% neutral

Why HN recommends it

A short, readable guide to how indexes (especially B-trees) and query execution work in Oracle, SQL Server, Postgres and MySQL. Suits application developers wanting practical speedups without deep internals.

Summarised by Claude from recommending comments

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

60 2007: 0 mentions2008: 0 mentions2009: 0 mentions2010: 0 mentions2011: 0 mentions2012: 0 mentions2013: 0 mentions2014: 2 mentions2015: 2 mentions2016: 1 mention2017: 2 mentions2018: 4 mentions2019: 4 mentions2020: 2 mentions2021: 5 mentions2022: 6 mentions2023: 2 mentions2024: 1 mention2025: 1 mention2026: 0 mentions200720172026

What Hacker News says

  • brightball · Jun 5, 2017 · Recommends

    SQL Performance Explained - Markus Winand - Excellent book that gets into the internals of what developers need to know about SQL and covers each part as it relates to the 4 major SQL databases (Oracle, SQL Server, Postgres,…

    on “Ask HN: What language-agnostic programming books should I read?” ↗
  • AlisdairO · Aug 29, 2014 · Recommends

    …papers are particularly fine reading. For people who looked at this wanting to get going with using database systems (as opposed to creating them), I'd recommend: Learning SQL by Alan Beaulieu SQL Performance Explained by Markus Winand SQL Cookbook by Anthony Molinaro The three of these will take you up to a pretty useful level of SQL knowledge/understanding. The first two are fairly easy reading to boot.

    on “Readings in Databases” ↗
  • dguaraglia · Aug 9, 2016 · Recommends

    If what you are looking is a general book (not necessarily just for Postgres) I can't recommend the "Use The Index, Luke"[1] tutorial, and the accompanying book "SQL Performance Explained" by Markus Winand, enough. It doesn't go into a lot of relational theory, but it does provide a somewhat low-level description on how indices and database data are stored, and why you want to use different…

    on “PostgreSQL Index Internals” ↗
  • branko_d · May 11, 2020 · Recommends

    If you are an application programmer needing to query the database, I wholeheartedly recommend "SQL Performance Explained" by Markus Winand, or his website: https://use-the-index-luke.com/

    on “Advanced SQL and database books and resources” ↗
  • fnord123 · Apr 11, 2018 · Recommends

    SQL Antipatterns is good as another commenter recommended. But my favourite book on the topic is Markus Winand's SQL Performance Explained. Most of it is online here: https://use-the-index-luke.com/ but I recommend buying it since it's tiny and worth its weight in gold. It's short so you actually read it and possibly reread it. It's to…

    on “We saved $50k/year with a Go microservice coded in a hackathon” ↗
  • skfist · May 16, 2018 · Recommends

    …so far: - Pragmatic Thinking & Learning by Andy Hunt - The Design of Everyday Things by Don Norman - The Effective Engineer* by Edmond Lau - The Pragmatic Programmer by Andy Hunt and Dave Thomas - SQL Performance Explained by Markus Winand And http://teachyourselfcs.com curriculum is pretty good as well. As a side note, there's so much we can learn from game programmers and OS/database/compiler engineers.

    on “Ask HN: Books you should have read when you start a career in SE / CS?” ↗
  • tomhallett · Mar 8, 2022 · Recommends

    I highly recommend the book "SQL Performance Explained" by Markus Winand: https://www.amazon.com/Performance-Explained-Everything-Deve...

    on “How does database indexing work? (2008)” ↗
  • frosted-flakes · Mar 8, 2022 · Recommends

    [1] above is a fantastic resource. I highly recommend Markus Winand's book "SQL Performance Explained" if you're in need of better performing SQL queries. It's quite short and small, but it covers all the bases, and uses introductory language.

    on “How does database indexing work? (2008)” ↗
  • throwaway81523 · Dec 3, 2022 · Recommends

    …and of course I used a throwaway address and unsubscribed immediately. It's actually probably a newsletter I wouldn't mind getting but the way it was done feels too spammy. I have Markus Winand's book SQL Performance Explained, actually paid for the download, and came away feeling cleaner. I do hear something from him through his mailing list once in a great while, and that is fine. I hope he comes out with another book someday.

    on “Show HN: I wrote a free eBook about many lesser-known/secret database tricks” ↗
  • jjice · Dec 6, 2022 · Recommends

    …Application Architecture - Martin Fowler Published in 2005 I believe, but still _very_ relevant. Good concrete architecture patterns and it's cool to see these patterns before they were no-brainers. * SQL Performance Explained - Markus Winand Actually how I first convinced my company to start paying for my books (and there have been 15+ since). We had a query that was running in an absurd amount of time for our largest customer…

    on “Ask HN: Best books read in 2022” ↗
  • jjice · Jan 14, 2025 · Recommends

    …being formalized - Designing Data Intensive Applications (Martin Kleppmann) - Fantastic perspective on your application's data. This is probably the most recommended book I've seen on Hacker News. - SQL Performance Explained (Markus Winand) - Just a killer, concise book to make you truly understand basic DB performance, specifically with indexes. I've met so many developers (myself included before this book) who thought any…

    on “Ask HN: What's the best book you've read regarding software development?” ↗
  • larve · Aug 15, 2022 · Recommends

    …books, which I plucked for the stuff I needed: - computer systems - bryant & o'hallaron - bpf performance tools - gregg - systems performance - gregg - every computer performance book - wescott - sql performance explained - winand - computer organization and design - hennessy, patterson - computer architecture - hennessy, patterson - algorithms - sedgewick - understanding software dynamics - sites - design of data…

    on “The value of owning more books than you can read (2018)” ↗
  • nindalf · Jan 17, 2017 · Recommends

    I second this. I prefer reading on pdf, so I bought the ebook[1]. The book explains indexing perfectly, and it shouldn't take you more than a day to finish. I can't recall a book having a better benefit/time ratio. I wish the author would release more books in this vein, but he hasn't. So right now I'm looking at Designing Data-Intensive Applications to learn more about different kinds of database

    on “Ask HN: What is the best online resource to learn advanced SQL?” ↗
  • gordon_freeman · Aug 13, 2021 · Recommends

    If anyone is interested, Winand's book "SQL Performance Explained" [1] really goes deep into understanding and optimizing SQL queries and improving performance of SQL queries. [1] https://sql-performance-explained.com/?utm_source=winand.at&...

    on “Modern SQL” ↗
  • boshomi · Feb 15, 2019 · Recommends

    @MarkusWindand: Thank you for the Websites [1],[2],[3] and the book »SQL Performance Explained«[4]. [1] https://modern-sql.com/ [2] https://use-the-index-luke.com/ [3] https://db-engines.com/ [4] https://www.amazon.de/SQL-Performance-Explained-Everything-p...

    on “PostgreSQL 11 Reestablishes Window Functions Leadership” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help