Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Markus Winand

    use-the-index-luke.com · Personal blog · on HN since 2010

    Markus Winand writes about SQL indexing, query performance and modern SQL features for application developers.

    Visit blogRSSHN submissions
    DatabasesSystems & Performance
    What HN says

    Commenters recommend it highly as a readable guide to database indexing, and some say they have new hires and interns read it.

    Stats for nerds
    171HN people shared it
    137linked in comments
    1.7Kstory points
    Jun 2026last shared
    2015people per year2026

    Top posts on HN

    1. 1
      MongoDB is to NoSQL like MySQL to SQL - in the most harmful way
      3 people · 224 points · first shared 2013 · 124 comments on HN
    2. 2
      SQL Indexing and Tuning E-Book for Developers
      86 people · 206 points · first shared 2010 · 6 comments on HN
    3. 3
      Results of the SQL Performance Quiz
      2 people · 179 points · first shared 2014 · 93 comments on HN
    4. 4
      On Uber’s Choice of Databases
      9 people · 169 points · first shared 2016 · 13 comments on HN
    5. 5
      What's left of NoSQL?
      4 people · 148 points · first shared 2014 · 104 comments on HN
    6. 6
      SQL Indexing and Tuning e-Book
      1 person · 130 points · first shared 2012 · 11 comments on HN
    7. 7
      The 3-minute SQL indexing quiz: Can you spot the five most common mistakes?
      3 people · 111 points · first shared 2011 · 32 comments on HN
    8. 8
      Big News in Databases
      1 person · 95 points · first shared 2016 · 23 comments on HN
    9. 9
      Myth: Select * is Bad
      1 person · 87 points · first shared 2013 · 67 comments on HN
    10. 10
      Everybody thinks SQL joins are slow-is it because MySQL doesn't have hash joins?
      2 people · 41 points · first shared 2011 · 24 comments on HN

    What HN people wrote when they linked it

    • j_sOct 2017

      Here's a recent discussion recommending a specific site that might help you as a resource, but I don't see much there regarding locality.

      How far can you go with MySQL or MariaDB?
      | https://news.ycombinator.com/item?id=14892184 (Aug 2017)

      > dmux This is a great resource RE indexing: http://use-the-index-luke.com/

      There is a detailed PostgreSQL optimization comment there that may be more what you had in mind:

      https://news.ycombinator.com/item?id=14896154

      > olavgg: Use multi-column/functional/partial indexes, as this will help you design a database where most of your 'hot' indexes can fit in RAM. If you have too many indexes, you will do index scan on disk, which is painfully slow. I[n] many cases a full table scan (sequential read) would be faster instead.

    • twoquestionsJul 2021

      To learn yourself, also go over the execution plan when running a query and Google absolutely everything it tells you, and look through the MSSQL documentation at what it all means. It won't lead you to what you don't know, but it will fill in everything you're a bit cloudy on.

      One of my favorites to get the very basics is Select Star, especially because you work with real and meaningful data: https://selectstarsql.com/

      Use the Index, Luke has also really helped me make queries that don't waste a ton of time:
      https://use-the-index-luke.com/

      Microsoft also has a bunch of paid training classes for MSSQL, if you or your boss don't mind ponying up some $$$. MSSQL is an amazing tool, and it's worth it to really learn how to use it well.

      Good luck!

    • moreaccountsplsJul 2020

      There's a difference between operating the database [SRE type job] vs consuming a database [developer]. They're both very valuable skills, but learning the basics of SQL [i.e. being a consumer] is a no brainer. The skills will serve you well for the rest of your career. It's not something that changes every few years like frontend frameworks do.

      This is my favorite learning material for ANY programming related skill ever: https://use-the-index-luke.com/, and it's all about SQL queries.

    • dguaragliaAug 2016

      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 kind of indices in different scenarios.

      [1] http://use-the-index-luke.com

    • aleccoSep 2020

      For practical knowledge start with databases. Declarative is a great way to program, and a good starting point is https://use-the-index-luke.com/

      About CompSci, it might get a bit dry at times. Seduce yourself into it, watch some Computerphile YouTube videos instead of a textbook. Then when you get the interest bug, search for what you are interested in. Try to keep it fun.

      Once you built stamina, TAOC and SICP.

      https://web.mit.edu/alexmv/6.037/sicp.pdf

    • tdfirthDec 2025

      If you do backend web development in 99% of software companies then being very good at whatever your RDBMS is is a superpower.

      It's definitely worth learning SQL very well, but you also need to learn the data structures your RDBMS uses, how queries translate into operations on that data, and what those operations look like in a query plan.

      You can go surprisingly far with just that knowledge.

      A great resource is https://use-the-index-luke.com/

    Related

    Modern SQLmodern-sql.com71 people

    Literate SQL

    Modern SQL
    Personal · last shared 2026
    jOOQ Blogblog.jooq.org126 people

    Say no to Venn diagrams when explaining SQL joins (2016)

    jOOQ Blog
    Company · last shared 2026
    Tomas Vondrablog.pgaddict.com22 people

    Performance since PostgreSQL 7.4 with pgbench

    Tomas Vondra
    Personal · last shared 2018
    Small Datumsmalldatum.blogspot.com63 people

    The original LSM paper

    Small Datum
    Personal · last shared 2026
    Percona Blogpercona.com327 people

    UUIDs are popular, but bad for performance (2019)

    Percona Blog
    Company · last shared 2026
    Tokutek Blogtokutek.com42 people

    532x Performance Increase for MongoDB with fractal tree indexes

    Tokutek Blog
    Company · last shared 2015
    Scattered Thoughtsscattered-thoughts.net186 people

    Against SQL

    Scattered Thoughts
    Personal · last shared 2026
    Timescale Blogblog.timescale.com95 people

    How percentile approximation works and why it's more useful than averages

    Timescale Blog
    Company · last shared 2022