Skip to content
Theory · Indexes and query plans · lesson 7 of 11

When an index doesn't help

The index at the back of the coffee book is great while you look up a whole word. But try to find every word that ends in "-latte". The index is sorted by the first letters, and the end of a word tells it nothing. Or find every page with a picture when every other page has one. It's faster to leaf through the book than to run between the index and the pages.

In this lesson

  • A function on the column
  • LIKE with % at the start
  • Few distinct values
  • A tiny table
  • Common mistake
  • Key points