Courseiva
Indexing →mediumMultiple Select

C100DEV Indexing Practice Question

A developer is tuning indexes on an `orders` collection. The team reports slow queries and heavy write latency, and they suspect too many indexes. Which TWO practices should the developer apply when reviewing the index set? (Choose two.)

⚠ Common exam trap

The trap here is assuming any index with a redundant prefix or a broader wildcard can be safely removed or consolidated, when only observed usage and query patterns justify those decisions.

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

✓

Compare query patterns with existing indexes to confirm each index supports a real workload.

Reducing index bloat requires evidence. `$indexStats` shows which indexes are actually used, and comparing real query patterns against the existing index set confirms whether each index earns its keep. Together these two practices let the team drop unused indexes and keep only those that support measured workload, lowering write cost without sacrificing query performance.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Replace all single-field indexes with wildcard indexes to consolidate coverage.

    Why it's wrong here

    Wildcard indexes are designed for unpredictable or dynamic field names and generally perform worse than targeted indexes for known query shapes. Replacing specific single-field indexes with wildcards would increase index size and could degrade selectivity, so it is not a sound consolidation strategy for a stable schema.

  • ✗

    Set the notablescan parameter to true so the server rejects unindexed queries.

    Why it's wrong here

    The `notablescan` parameter makes the server reject queries that would require a collection scan, which is useful in controlled testing but not for production index review. Enabling it in production would break legitimate queries and does not help identify unused indexes or reduce write overhead.

  • ✓

    Compare query patterns with existing indexes to confirm each index supports a real workload.

    Why this is correct

    Mapping observed query shapes to the current index set reveals gaps and redundancies. An index that supports no measured query pattern is a removal candidate, while a missing index for a frequent shape is a creation candidate. This evidence-based review aligns index maintenance with actual workload rather than assumptions.

  • ✓

    Use the $indexStats aggregation stage to identify indexes with low access counts.

    Why this is correct

    The `$indexStats` stage reports access statistics per index, including the number of operations that used each index. Indexes showing zero or near-zero accesses over a representative period are candidates for removal. This directly addresses the scenario by surfacing unused indexes that add write overhead without benefiting queries.

  • ✗

    Drop every compound index whose prefix duplicates another index to reduce write cost.

    Why it's wrong here

    Removing indexes purely because of prefix overlap is risky. A compound index with a shared prefix may still serve queries that the shorter index cannot, particularly when sort or additional equality fields are involved. Decisions should be based on observed usage and query patterns rather than prefix duplication alone.

About these practice questions

This C100DEV question is part of Courseiva's 259-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 C100DEV 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 C100DEV exam.