Courseiva
Indexing and Performance →hardMultiple Choice

C100DBA Indexing and Performance Practice Question

Exhibit

{
  "queryPlanner": {
    "winningPlan": {
      "stage": "COLLSCAN",
      "filter": {
        "status": { "$eq": "active" }
      },
      "direction": "forward"
    },
    "rejectedPlans": []
  }
}

Refer to the exhibit. An application queries active user documents frequently, but explainPlan output reveals a COLLSCAN stage. What is the most appropriate remediation step?

⚠ Common exam trap

Candidates often suggest multi-key indexes or complex compound indexes when a simple single-field index on the filtered field is the most direct and efficient solution to eliminate a COLLSCAN.

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

✓

Create a single-field index on the status field using db.collection.createIndex({ status: 1 }).

A COLLSCAN stage indicates that the query engine scanned every document in the collection because no suitable index was found. Creating an index on the filtered field enables the query planner to select an IXSCAN stage, drastically reducing disk reads and improving throughput.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Modify the application connection string to include readConcern level linearizable.

    Why it's wrong here

    Linearizable read concern guarantees that the returned data reflects majority-committed writes at the moment of the read. It affects consistency guarantees and replication mechanics, but it does not address missing index structures causing full collection scans.

  • ✓

    Create a single-field index on the status field using db.collection.createIndex({ status: 1 }).

    Why this is correct

    Adding an index on the status field provides the query planner with a direct lookup path. Instead of performing an expensive collection scan, the query execution engine leverages an index scan to locate active documents instantaneously.

  • ✗

    Restart the primary database node to clear the query plan cache and force re-evaluation.

    Why it's wrong here

    Restarting a replica set member clears the internal plan cache, but it cannot invent an index where none exists. If the underlying collection lacks an index on the status field, the planner will continue selecting a collection scan after the restart.

  • ✗

    Increase the WiredTiger cache size configuration parameter to cache the entire collection in RAM.

    Why it's wrong here

    Caching an entire collection in RAM mitigates physical disk latency, but the CPU still must iterate through every document header during a collection scan. Proper indexing remains mandatory for efficient query execution regardless of available RAM.

About these practice questions

Courseiva writes every C100DBA question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.