Courseiva
Indexing and Performance →easyMultiple Choice

C100DBA Indexing and Performance Practice Question

A DBA notices that a query on the products collection uses an index scan but returns only a small fraction of documents. The index is { category: 1, price: 1 }. The query filters on category and price with a range condition on price. Which statement best describes why the index might still be efficient despite scanning many index entries?

⚠ Common exam trap

The trap here is assuming that an index scan is inefficient simply because it examines many index keys, when the key benefit is avoiding a full collection scan and fetching only matching documents.

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 index scan is efficient because it can use the index bounds to limit the scan to the relevant category and price range, reducing the number of documents fetched.

The index { category: 1, price: 1 } supports efficient filtering when the query has an equality predicate on category and a range predicate on price. MongoDB can use index bounds to seek to the correct category and scan only the relevant price range, minimizing the number of documents fetched. This makes the index scan efficient despite examining many index entries.

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 scan is efficient because MongoDB automatically converts it to a collection scan when the selectivity is low.

    Why it's wrong here

    MongoDB does not automatically convert an index scan to a collection scan based on selectivity. The query planner chooses an index scan or collection scan based on cost estimates at plan selection time. If an index is chosen, it will be used as planned. There is no dynamic conversion during execution. This statement misrepresents how the query planner and execution engine operate.

  • ✓

    The index scan is efficient because it can use the index bounds to limit the scan to the relevant category and price range, reducing the number of documents fetched.

    Why this is correct

    When a query filters on category (equality) and price (range), the index { category: 1, price: 1 } allows MongoDB to set index bounds for both fields. It can seek directly to the matching category and then scan only the price range within that category. This limits the number of index entries examined and the number of documents fetched, making the index scan efficient even if it examines many index keys, because it avoids a full collection scan.

  • ✗

    The index scan is efficient because it avoids fetching documents entirely due to the index being covered.

    Why it's wrong here

    The index { category: 1, price: 1 } does not contain all fields returned by the query unless the query projects only category and price and excludes _id. In most cases, the query returns additional fields, so the index is not covering. Therefore, the efficiency cannot be attributed to a covered query. The index scan still requires fetching documents for the returned fields, so this statement is not generally true.

  • ✗

    The index scan is efficient because it uses the index only for sorting and not for filtering.

    Why it's wrong here

    The index { category: 1, price: 1 } can be used for both filtering and sorting if the query sorts on category and price in the same order. However, the scenario describes a filter on category and a range on price, so the index is used for filtering. Using the index only for sorting would not limit the number of documents fetched; it would still require scanning many documents. This statement incorrectly describes the index’s role.

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.