Courseiva
Indexing and Performance →mediumMultiple Choice

C100DBA Indexing and Performance Practice Question

Exhibit

{
  "ns": "db.collection",
  "nReturned": 10000,
  "totalKeysExamined": 10000,
  "totalDocsExamined": 10000,
  "planSummary": "COLLSCAN"
}

Refer to the exhibit. What does this output indicate about the query performance?

⚠ Common exam trap

Candidates often confuse IXSCAN with COLLSCAN, mistakenly believing that a high number of examined documents in a full scan means the index is working effectively.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The query requires an index to avoid a full collection scan.

A 'COLLSCAN' indicates that the database is performing a full collection scan, reading every document to satisfy the query. The high number of docs examined relative to the returned documents suggests that the query is inefficient. In a production environment, this is a major performance bottleneck, as the database engine must load entire documents into memory to evaluate the filter, leading to high I/O and latency.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The query is fully covered by an index.

    Why it's wrong here

    A covered query would show an IXSCAN in the plan summary and totalDocsExamined would be zero. Because this query shows a COLLSCAN and totalDocsExamined equals nReturned, the system is reading every document in the collection, which is the least efficient way to retrieve data in MongoDB.

  • ✓

    The query requires an index to avoid a full collection scan.

    Why this is correct

    The presence of COLLSCAN signifies that no suitable index was found to narrow the search scope. To improve performance, an index should be created on the fields used in the query filter, which would allow the database to locate the necessary documents using an efficient index scan instead.

  • ✗

    The query is performing well because nReturned equals totalDocsExamined.

    Why it's wrong here

    While it is good that the database isn't examining documents it doesn't return, a COLLSCAN on a large collection is still highly inefficient compared to an index scan. It implies that the database must perform full disk I/O to check every document, which does not scale well with collection growth.

  • ✗

    The index is being used, but it is not selective enough.

    Why it's wrong here

    The plan summary explicitly states COLLSCAN, meaning no index was used at all. If an index were used but lacked selectivity, the plan summary would show IXSCAN, and totalDocsExamined would be significantly higher than nReturned, indicating that the index narrowed the result set but still required document inspection.

About these practice questions

One of 222 original C100DBA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DBA practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DBA exam.