Tsallaka zuwa abun ciki
Justice Tech School

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 totalDocsExamined

Exercise

Show the plan.

.("executionStats")

Quiz Test

What does COLLSCAN mean?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.