Courseiva
Indexing and Performance →mediumMultiple Choice

C100DBA Indexing and Performance Practice Question

Which situation is best suited for a Multikey Index?

⚠ Common exam trap

Candidates mistakenly believe Multikey indexes are for general performance optimization, rather than specifically for indexing fields that contain arrays, leading to incorrect index selection for standard field queries.

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

✓

Querying documents based on specific elements inside an array field.

Multikey indexes are used when you need to index a field that contains an array. MongoDB creates an index entry for each element in the array, allowing you to efficiently query for documents containing specific array values. This is essential for applications managing tags, inventory lists, or user attributes stored as arrays, ensuring that queries filtering by these elements perform with high efficiency rather than scanning the entire collection.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Indexing a collection where every document contains a simple numeric ID.

    Why it's wrong here

    For simple numeric IDs, a standard B-tree index is sufficient and more space-efficient. Multikey indexes are designed specifically for array fields. Using a multikey index on a non-array field provides no additional benefit and adds unnecessary complexity to the index management overhead of the database engine.

  • ✓

    Querying documents based on specific elements inside an array field.

    Why this is correct

    Multikey indexes are the standard solution for indexing array fields. They allow the database to map each individual array element to the corresponding document, making it possible to query the contents of arrays efficiently. Without a multikey index, querying an array field would result in a slow collection scan.

  • ✗

    Improving the performance of large joins across multiple collections.

    Why it's wrong here

    Multikey indexes do not address join performance, which is handled by the $lookup aggregation stage. Joins depend on indexes on the foreign key fields in the joined collections, not on the ability to index array elements. Multikey indexes specifically target the internal structure of documents within a single collection.

  • ✗

    Enforcing unique constraints on non-array fields.

    Why it's wrong here

    While multikey indexes can support unique constraints, they are not the primary reason to use them. A unique index on an array field ensures that no two documents share the same set of array elements. This is a specific use case, not the general purpose of multikey indexing.

About these practice questions

Courseiva writes every C100DBA question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.