Courseiva
Indexing →hardMultiple Choice

C100DEV Indexing Practice Question

What is the primary technical limitation when creating a covered query?

⚠ Common exam trap

Candidates often assume that any query using an index is a covered query, forgetting that including unindexed fields in the projection forces a document fetch from disk.

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

✓

All projected fields must be contained in the index.

A covered query occurs when all fields requested in the query are present in the index. This allows MongoDB to return the result set directly from the index without having to load the actual documents from disk. The primary limitation is that you must include only the indexed fields in your projection. If even one field is not in the index, the database must perform an expensive 'fetch' operation to retrieve the full document from storage.

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 must include the _id field.

    Why it's wrong here

    By default, MongoDB includes the _id field in query results. If you are using a covered query, you must explicitly exclude the _id field using a projection like {_id: 0}. If you don't exclude it, the _id field will be fetched from the document, breaking the covered query optimization and forcing a disk read.

  • ✓

    All projected fields must be contained in the index.

    Why this is correct

    For a query to be covered, the index must contain every field returned by the projection. If the projection includes any field that is not indexed, the engine must access the original document to retrieve that data, which defeats the purpose of the covered query and increases I/O overhead significantly.

  • ✗

    The collection must be small.

    Why it's wrong here

    Covered queries are actually more valuable on large collections. The optimization allows the database to avoid loading huge documents into RAM, which is critical for performance on massive datasets. The size of the collection does not affect the technical ability to achieve a covered query, provided the index is correctly structured.

  • ✗

    Covered queries only work with single-field indexes.

    Why it's wrong here

    Covered queries can work with compound indexes as well. The requirement is simply that all fields used in the query and projection are present in the index. You can certainly cover a query using a compound index, provided the projection aligns with the fields included in that specific index structure perfectly.

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.