C100DBA Indexing and Performance Practice Question
What is the consequence of having a high number of 'keysExamined' compared to 'nReturned' in a query?
⚠ Common exam trap
Candidates often assume that any index usage is efficient, failing to recognize that a high ratio of examined keys to returned documents indicates a poorly selective or unoptimized index.
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 is inefficiently scanning the index.
A large discrepancy between 'keysExamined' and 'nReturned' suggests that the index is not very selective or is being used inefficiently. The engine is scanning many index entries that do not match the query criteria, which is a major performance drain. Investigating the selectivity of the index and potentially adding more fields to the compound index can help narrow down the search and improve efficiency.
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 index is too small and needs to be rebuilt.
Why it's wrong here
Index size is not directly related to the selectivity of the index entries. The problem here is that the index contains many entries that do not satisfy the filter conditions. Rebuilding the index would not change the distribution of the data or the efficiency of the lookup.
- ✓
The query is inefficiently scanning the index.
Why this is correct
When keysExamined is significantly higher than nReturned, the query engine is visiting many index entries that don't match the query. This indicates that the index is poorly suited for the query's filter, causing unnecessary index I/O and increasing the time it takes to return the results.
- ✗
The database is performing a cache miss.
Why it's wrong here
A cache miss occurs when data is not in the WiredTiger cache and must be fetched from disk. While an inefficient index scan might increase cache pressure, the discrepancy between keysExamined and nReturned is specifically a sign of a poor filtering strategy, not inherently a disk-level cache issue.
- ✗
The query will be automatically optimized.
Why it's wrong here
MongoDB does not automatically re-optimize queries based on runtime execution statistics like key-to-return ratios. It is the DBA's responsibility to identify these inefficiencies and manually optimize the indexes by refining compound index structures or index filtering to ensure that the engine examines only the relevant records.
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 →
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.