Recall & Review
beginner
What is index intersection in MongoDB?
Index intersection is when MongoDB combines multiple indexes to answer a query instead of using just one index. This helps improve query performance when no single index covers all query conditions.
Click to reveal answer
intermediate
How does MongoDB decide to use index intersection?
MongoDB's query planner evaluates available indexes and may choose to intersect them if it estimates that combining indexes will be faster than using a single index or scanning the collection.
Click to reveal answer
intermediate
Can MongoDB intersect any number of indexes for a query?
No, MongoDB supports index intersection using up to 2 indexes for a single query.
Click to reveal answer
beginner
What types of queries benefit most from index intersection?
Queries with multiple conditions on different fields that each have their own index benefit most. MongoDB can intersect these indexes to efficiently filter documents matching all conditions.
Click to reveal answer
intermediate
Does index intersection always improve query performance?
Not always. Sometimes using a single compound index or scanning the collection is faster. MongoDB's query planner chooses the best approach based on data statistics.
Click to reveal answer
What does MongoDB do when it uses index intersection?
✗ Incorrect
Index intersection means MongoDB combines multiple indexes to efficiently answer a query.
How many indexes can MongoDB intersect for a single query?
✗ Incorrect
MongoDB supports index intersection using up to 2 indexes for a single query.
Which query type benefits most from index intersection?
✗ Incorrect
Queries with multiple conditions on different indexed fields benefit most from index intersection.
Does index intersection always guarantee the fastest query?
✗ Incorrect
MongoDB's query planner chooses the best approach; index intersection is not always fastest.
What role does the query planner have in index intersection?
✗ Incorrect
The query planner evaluates indexes and decides if index intersection will improve query speed.
Explain what index intersection is and when MongoDB uses it.
Think about how MongoDB can use more than one index to answer a query.
You got /4 concepts.
Describe the limitations and benefits of index intersection in MongoDB.
Consider both what index intersection can and cannot do.
You got /4 concepts.