← All MongoDB Flashcard Decks

MongoDB Indexing and Performance Flashcards

6 cards from real MongoDB practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 MongoDB Indexing and Performance flashcards as text
  1. What is the default index created automatically on every MongoDB collection?

    Answer: A unique index on the _id field

    MongoDB automatically creates a unique index on the _id field for every collection, which cannot be dropped.

  2. Which method creates an index on a MongoDB collection?

    Answer: collection.createIndex()

    createIndex() creates an index on the specified field(s) with the given options, or returns the existing index name if it already exists.

  3. What does a compound index in MongoDB index?

    Answer: Multiple fields within a single index

    A compound index includes references to multiple fields, supporting queries that filter or sort on those fields in the specified order.

  4. What is a sparse index in MongoDB?

    Answer: An index that only includes documents where the indexed field exists

    A sparse index only contains entries for documents that have the indexed field, skipping documents where the field is absent.

  5. Which explain() verbosity mode shows the winning query plan and execution statistics?

    Answer: 'executionStats'

    'executionStats' mode returns statistics about the winning plan's execution, including documents examined and time taken.

  6. What does the hint() cursor method do in MongoDB?

    Answer: Forces MongoDB to use a specific index for the query

    hint() overrides MongoDB's query optimizer and forces use of the specified index, which can be specified by name or key pattern.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. 10geneducation.zendesk.com — Test dates, score release, passing score, test delivery, retake policy · verified Oct 2026
  2. learn.mongodb.com — Eligibility, fees, exam format, time limit · verified Oct 2026