11.) What is the recommended way to avoid performance issues with $or queries?
A) Use $and instead of $or
B) Optimize indexes for each condition
C) Avoid combining conditions
D) Always use aggregation pipelines
12.) Which tool is used to visualize MongoDB performance metrics?
A) MongoDB Compass
B) db.collection.analyze()
C) mongotop
D) mongostat
13.) What does the “working set” in MongoDB refer to?
A) The set of active indexes
B) The data frequently accessed by the database
C) The documents processed by a query
D) The memory allocated for aggregation
14.) What is the purpose of the $limit stage in the aggregation pipeline?
A) Filters documents based on conditions
B) Groups documents by a field
C) Joins two collections
D) Restricts the number of documents processed
15.) How can sharding improve MongoDB performance?
A) By increasing document size limits
B) By distributing data across multiple servers
C) By reducing index usage
D) By disabling replication
16.) Which command analyzes replication performance in MongoDB?
A) mongotop
B) mongostat
C) db.printReplicationInfo()
D) db.replicaSet.stats()
17.) Which MongoDB feature prevents large write operations from overwhelming the database?
A) Query profiler
B) Write concern
C) Read preference
D) Capped collections
18.) What is the purpose of secondary indexes?
A) To speed up specific queries
B) To improve write performance
C) To manage sharding configurations
D) To reduce document size
19.) Which storage option ensures faster reads for frequently accessed data?
A) Disk-based storage
B) Distributed storage
C) Compressed storage
D) In-memory storage
20.) How does MongoDB ensure write durability?
A) Using query profiling
B) By enabling journaling
C) By sharding data
D) By creating multiple indexes
Related