C100DBA Indexing and Performance Practice Question
A DBA is troubleshooting a slow query on a large collection. Which two techniques directly reduce the number of documents the query must examine for an equality-plus-range predicate? (Choose two.)
⚠ Common exam trap
The trap here is treating consistency or storage-tuning knobs like read concern or fill factor as if they reduce the documents a query examines, when only index selectivity and bounds do.
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 compound index with the equality field first and the range field second.
Reducing documents examined comes from narrowing the index scan. A compound index ordered equality-then-range lets the engine seek to the exact key range, and a partial index filtered on the equality predicate stores only relevant entries, shrinking the index. Both directly cut keys and documents examined. Read concern, hint to _id, and page fill settings do not change the access path work for this predicate.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create a compound index with the equality field first and the range field second.
Why this is correct
Placing the equality field first gives the index a tight prefix bound, and the range field second allows the index to scan only the relevant range within that equality. This ordering lets the engine seek directly to matching keys rather than scanning broadly, directly cutting documents examined. It is a core index design rule for mixed equality and range predicates.
- ✗
Add a hint forcing the query to use the _id index.
Why it's wrong here
The _id index only supports lookups by _id. Forcing it with hint on an equality-plus-range query against other fields causes a full index scan of _id entries followed by document fetches and in-memory filtering, which increases work rather than reducing documents examined. It is a misapplication of hint for this predicate shape.
- ✓
Create a partial index with a filter expression matching the query's equality predicate.
Why this is correct
A partial index stores entries only for documents satisfying its filter expression, so when the filter matches the query's equality predicate, the index is smaller and the planner can seek to exactly those entries. This reduces keys and documents examined compared to a full index, and lowers storage and write overhead. It is a valid technique for shrinking the working set.
- ✗
Set the query's read concern to 'majority' to reduce examined documents.
Why it's wrong here
Read concern controls the consistency and durability guarantees of the data returned, not the access path or the number of documents examined. Setting majority read concern can actually add latency because it waits for replicated acknowledgement. It has no effect on how many keys or documents the query plan inspects.
- ✗
Increase the index's fill factor using collMod to leave more space on pages.
Why it's wrong here
MongoDB's WiredTiger storage engine does not expose a fill factor setting for indexes in the way some relational systems do, and collMod does not tune index page fill. Even if it did, page packing affects write and split behavior, not the number of index keys or documents a query must examine for a given predicate.
About these practice questions
This C100DBA question is part of Courseiva's 222-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 →
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.