MongoDB / Indexing Interview Questions 2026
Published July 22, 2026 · Updated July 22, 2026
10 MongoDB / Indexing interview questions from General, Amazon, TCS and more. Real questions from Technical, System Design, and HR rounds.
10 questions
Companies: General, Amazon, TCS
All MongoDB / Indexing Questions
General
Hard
Scenario round
4-8 years
Your MongoDB write throughput dropped 80% after enabling journaling and write concern w:majority. Explain what each does and propose a solution that maintains durability without killing performance.
↑ 65 upvotes · 13 engineers asked this · SDE2
General
Hard
System Design round
4-7 years
Design a MongoDB schema for a chat application. Messages belong to conversations. Users can be in many conversations. You need to query: all messages in a conversation (paginated), all conversations for a user (sorted by latest message).
↑ 64 upvotes · 12 engineers asked this · SDE2
General
Hard
Technical round
3-6 years
Your MongoDB collection has 50 million documents. A query filtering on a nested array field is doing a full collection scan despite having an index on that field. What's likely wrong?
↑ 63 upvotes · 11 engineers asked this · SDE2
TCS
Hard
Screening round
3-6 years
How do you model a tree structure (category hierarchy) in MongoDB? Compare parent-reference, child-reference, and materialized path.
↑ 54 upvotes · 52 engineers asked this · SDE2
Amazon
Hard
Screening round
3-6 years
Explain MongoDB's write concern and read preference options. What trade-offs do they make?
↑ 53 upvotes · 51 engineers asked this · SDE2
TCS
Hard
Technical round
3-6 years
What is a MongoDB aggregation pipeline? Write one that joins two collections and computes grouped statistics.
↑ 52 upvotes · 50 engineers asked this · SDE2
TCS
Hard
Screening round
3-6 years
Explain when you should NOT use MongoDB and should use a relational database instead.
↑ 51 upvotes · 49 engineers asked this · SDE2
Amazon
Hard
Screening round
4-8 years
Your MongoDB replica set has 3 nodes. The primary goes down. How long before writes can resume and what determines this?
↑ 12 upvotes · 20 engineers asked this · SDE2
General
Hard
Screening round
4-8 years
Explain MongoDB's WiredTiger storage engine. How does its document-level locking differ from earlier MMAPv1 collection-level locking?
↑ 11 upvotes · 19 engineers asked this · SDE2
General
Hard
Technical round
3-7 years
You have a MongoDB aggregation pipeline that runs for 30 seconds on a collection with 10 million documents. How do you optimize it?
↑ 10 upvotes · 18 engineers asked this · SDE2
Practice these questions with AI feedback
Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.
Build my study plan →
Same topic at specific companies
Related topics
Frequently asked questions
Your MongoDB write throughput dropped 80% after enabling journaling and write concern w:majority. Explain what each does and propose a solution that maintains durability without killing performance.
Your MongoDB write throughput dropped 80% after enabling journaling and write concern w:majority. Explain what each does and propose a solution that maintains durability without killing performance.
Design a MongoDB schema for a chat application. Messages belong to conversations. Users can be in many conversations. You need to query: all messages in a conversation (paginated), all conversations for a user (sorted by latest message).
Design a MongoDB schema for a chat application. Messages belong to conversations. Users can be in many conversations. You need to query: all messages in a conversation (paginated), all conversations for a user (sorted by latest message).
Your MongoDB collection has 50 million documents. A query filtering on a nested array field is doing a full collection scan despite having an index on that field. What's likely wrong?
Your MongoDB collection has 50 million documents. A query filtering on a nested array field is doing a full collection scan despite having an index on that field. What's likely wrong?
How do you model a tree structure (category hierarchy) in MongoDB? Compare parent-reference, child-reference, and materialized path.
How do you model a tree structure (category hierarchy) in MongoDB? Compare parent-reference, child-reference, and materialized path.
Explain MongoDB's write concern and read preference options. What trade-offs do they make?
Explain MongoDB's write concern and read preference options. What trade-offs do they make?