Challenge 2: Read an explain() Output — Possible Solution ==================================================================== WHAT THIS TELLS YOU ------------------------------ stage: "COLLSCAN" means this query performed a full COLLECTION SCAN — no index was used at all. totalDocsExamined: 500000 vs nReturned: 12 means MongoDB had to check all 500,000 documents in the collection just to find the 12 that actually matched — an extremely wasteful ratio (examining over 41,000 documents for every 1 actually returned). This is precisely the scenario the chapter's "what a missing index actually costs" section described: this query would likely have felt fine during development against a small test collection, and only reveals its real cost once the collection has grown to real production-sized volume (500,000 documents here). WHAT TO DO ABOUT IT ------------------------------ Create an index on whatever field(s) this query filters by. Since the explain() output doesn't show the actual query here, the general fix is: identify the field(s) in the query's filter conditions, and run createIndex({ : 1 }) (or a compound index if multiple fields are filtered together) — then re-run explain("executionStats") on the same query afterward to confirm the stage changes from COLLSCAN to IXSCAN, and that totalDocsExamined drops down much closer to nReturned. WHY THIS WORKS AS AN ANSWER ------------------------------ The specific numbers matter here, not just the word "COLLSCAN" — the huge gap between totalDocsExamined (500,000) and nReturned (12) is what makes this a genuinely urgent case rather than a minor inefficiency, and re-checking with explain() afterward is what turns "I added an index" into "I confirmed the index actually gets used," which is the entire point of the tool this chapter introduced.