Lesson 3.15mIntermediate8.2k students

How indexes work

An index is a sorted structure the planner may choose to use. Column order in a composite index decides which queries it can serve.

This lesson sits in Query Performance, part of PostgreSQL for Developers. It assumes what came before it and leads directly into the next lesson in the module.

In this lesson you will

  • Understand B-tree indexes and column order
  • Add partial and expression indexes where they fit
  • Weigh the write cost of every index you add

Resources