Which shortcut to build

The shortcut most indexes are: a sorted tree whose leaves point at rows in the table. This lesson is about the other shortcuts Postgres can build, how to pick the right one for a query, and what every one of them costs on the next write.
Before you start. B-Tree on Disk showed what an index is: a second, sorted copy of one column that points back at the table, so a lookup reads a few pages instead of all of them. MVCC & Vacuum showed that an update does not change a row in place; it writes a new version and leaves the old one for vacuum. The sentence that says what set up the bench this lesson runs on, and The Query Planner showed how Postgres chooses between a scan and an index. Here you choose the index.