next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
Questions
2 of 18
1
What are indexes?
2
How to create Indexes?
3
On which filed you will create an index - projection field or filter field?
4
What happens if I create an index on all fields of the collection?
5
What is the difference between Single Field Indexes & Compound Indexes?
6
How to list all indexes?
7
How to drop an index?
8
What is a 'Covered Query' and how do you design one using Projection?
9
Explain the ESR (Equality, Sort, Range) rule. Why is the order of fields in a compound index so critical?
10
What is a Sparse Index? Discuss its usage and advantages.
11
What is a 'Partial Index' and when would you choose it over a 'Sparse Index'?
12
How do indexes affect write performance in a collection that handles 5,000 inserts per second?
13
Walk me through the output of .explain('executionStats'). What are the red flags for a senior dev?
14
How do you handle 'Index Intersection'? Is it better to have two single-field indexes or one compound index?
15
Explain the internal mechanics of a 'Multikey Index'. What happens if you index an array of 1,000 elements?
16
How do TTL (Time-To-Live) indexes work and what are their limitations?
17
When would you use a Hashed Index vs. a standard B-Tree index?
18
You are scraping retail data. You need to query by category (string), sort by price (number), and filter by lastSeen (date range). How do you index this?
MongoDB
Basics
CRUD
Bulk Operations
Indexing
Data Modelling
Replication
Sharding
Transactions
Aggregation
Questions
All Topics
A-
Reset
A+
02 / 18
How to create Indexes?
To create an index, use the createIndex() shell method or
In nodeJS:
Copy
Suggest Improvement