Skip to content
Theory · MongoDB: Aggregation, Indexes and Scaling · lesson 8 of 13

Indexes and explain()

While the box holds ten orders, finding Anna's orders is not hard: the barista goes through ten cards. When there are a million cards, he puts lettered dividers into the box and files the cards by customer name. Now he opens the box right at the letter "A" and reads only the cards he needs.

In this lesson

  • Single-field index
  • Compound index
  • Index on an array
  • Covered query
  • Common mistake
  • Key points