0
0
MongoDBquery~5 mins

When not to index in MongoDB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
Why should you avoid indexing fields with very few unique values in MongoDB?
Because indexes on fields with low uniqueness (like boolean fields) do not improve query performance much and can add unnecessary overhead.
Click to reveal answer
beginner
What is a downside of indexing fields that are rarely used in queries?
Indexing rarely queried fields wastes storage and slows down write operations without benefiting read performance.
Click to reveal answer
intermediate
Why might you avoid indexing very large fields or fields with large data size?
Because large fields increase index size, which can slow down index maintenance and use more disk space.
Click to reveal answer
beginner
How can too many indexes affect MongoDB write performance?
Each index must be updated on writes, so having many indexes slows down insert, update, and delete operations.
Click to reveal answer
intermediate
When is it not recommended to create an index on a field that changes frequently?
Because frequent changes cause constant index updates, which can degrade write performance.
Click to reveal answer
Which type of field is generally NOT a good candidate for indexing in MongoDB?
AFields with many unique values
BFields frequently used in queries
CFields with very few unique values
DFields used in sorting
What happens if you create too many indexes on a MongoDB collection?
AStorage space decreases
BRead operations become slower
CIndexes automatically merge
DWrite operations become slower
Why should you avoid indexing fields that rarely appear in queries?
AThey waste resources without benefit
BThey reduce storage needs
CThey improve query speed
DThey speed up writes
Which field characteristic can make an index very large and slow to maintain?
AFields with large data size
BFields with short strings
CFields with boolean values
DSmall numeric fields
When is it NOT recommended to index a field that changes frequently?
AWhen it is used in queries
BWhen frequent updates cause overhead
CWhen it is rarely updated
DWhen it is a primary key
Explain why indexing fields with low uniqueness can be harmful in MongoDB.
Think about how useful an index is if many documents share the same value.
You got /3 concepts.
    Describe situations when you should avoid creating indexes to keep MongoDB efficient.
    Consider both read and write performance impacts.
    You got /4 concepts.