Courseiva
Indexing and Performance →easyMultiple Choice

C100DBA Indexing and Performance Practice Question

A DBA needs a query that returns only the fields name and email from a 'users' collection, filtered by an equality on email, to avoid fetching full documents from disk. Which index design supports this efficiently?

⚠ Common exam trap

The trap here is assuming any index on the filter field avoids document fetches, when coverage requires the index to also contain every projected field.

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

✓

A compound index { email: 1, name: 1 } so the query can be covered by the index.

A covered query is one whose filter and projection are both satisfied by the index, so no document fetch is needed. Including every projected field in the index, as with { email: 1, name: 1 }, lets the engine return results straight from index keys. Single-field, hashed, and text indexes cannot supply the projected name field, so they cannot cover this query.

Answer analysis

Option-by-option breakdown

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

  • ✗

    A single-field index on email, relying on the query's projection to fetch name from the document.

    Why it's wrong here

    An index on email alone contains only email and the record id, not name. The engine must still fetch each matching document to retrieve name, so documents are examined and disk reads occur. This does not achieve the goal of avoiding document fetches, making it insufficient for the stated requirement.

  • ✗

    A text index on name and email to cover both fields.

    Why it's wrong here

    Text indexes are designed for full-text search and stemmed token matching, not precise equality on email or covered projections. A text index cannot serve as a covered query for an exact email equality plus name projection, and it imposes additional tokenization overhead, so it fails to satisfy the performance goal here.

  • ✓

    A compound index { email: 1, name: 1 } so the query can be covered by the index.

    Why this is correct

    When the index contains every field referenced by the query's filter and projection, MongoDB can return results directly from the index without fetching documents. An index { email: 1, name: 1 } supports the equality on email and supplies name, so the projection is satisfied entirely from index keys, eliminating document fetches and reducing examined documents to index keys only.

  • ✗

    A hashed index on email to speed equality matching.

    Why it's wrong here

    Hashed indexes support only equality matches on the hashed field and cannot satisfy a projection of name. The query would still need to fetch documents for name, and hashed indexes cannot be used for range or sort operations. This does not meet the requirement of avoiding document fetches for the projected field.

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 →

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.