Explain Plans
explain shows how a query runs. IXSCAN means an index was used, COLLSCAN means every document was read.
Example
db.users.find({ email: "a@x.com" }).explain("executionStats")
// look for stage: "IXSCAN" and totalDocsExaminedExercise
Show the plan.
.("executionStats")
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.