Courseiva
Indexing and Performance →easyMultiple Choice

C100DBA Indexing and Performance Practice Question

A support team reports that a MongoDB 6.0 replica set is experiencing slow queries on a collection where almost every document has a unique value for the field status. A developer suggests creating a hashed index on status to speed up equality lookups. Which outcome should the DBA expect?

⚠ Common exam trap

Candidates often confuse the purpose of hashed indexes, which is even data distribution for sharding, with general query performance optimization.

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 hashed index will not improve equality query performance and is primarily intended for even data distribution in sharded clusters.

Hashed indexes are optimized for even distribution of values, which is critical for sharding but not for improving equality query performance on a single replica set. A standard B-tree index on a high-cardinality field like status already provides efficient equality lookups and supports range queries. Therefore, a hashed index would not be the right choice to speed up these queries; it is better suited for shard keys that need uniform distribution.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Hashed indexes provide no benefit for equality queries on high-cardinality fields and should not be used.

    Why it's wrong here

    This overstates the case. Hashed indexes distribute values evenly, which is valuable for sharding and for equality queries where the goal is even data distribution. However, for a single-node equality lookup on a high-cardinality field, a B-tree index is generally more efficient because it supports range queries and ordered scans. Saying hashed indexes provide no benefit at all is too absolute and ignores their role in sharding.

  • ✗

    A hashed index will improve equality query performance but will prevent the use of range queries on status.

    Why it's wrong here

    While it is true that hashed indexes do not support range queries, the scenario is about equality lookups on a high-cardinality field. The statement implies a performance improvement, which is not the primary benefit here. A B-tree index would already handle equality efficiently and also support ranges. The DBA should not expect a hashed index to improve equality query performance; it may even be less efficient due to hashing overhead.

  • ✓

    A hashed index will not improve equality query performance and is primarily intended for even data distribution in sharded clusters.

    Why this is correct

    Hashed indexes are designed to distribute documents evenly across shards by hashing the shard key value. For a single-node equality lookup, a standard B-tree index is usually sufficient and more versatile because it supports range queries and sorted access. Since the field already has high cardinality, a B-tree index on status would provide efficient equality lookups without the drawbacks of hashed indexes, which cannot be used for range queries.

  • ✗

    Hashed indexes are ideal for equality lookups and will outperform a standard B-tree index for this query pattern.

    Why it's wrong here

    Hashed indexes are designed to distribute values uniformly, not to maximize single-key lookup performance. For a simple equality query on a high-cardinality field, a standard B-tree index typically performs as well or better because it stores keys in sorted order and can serve range queries too. The claim that hashed indexes will outperform B-tree indexes for this pattern is not supported; hashed indexes mainly benefit sharding and even distribution.

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 →

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.