11.) What does the profiler in MongoDB do?
A) Monitors slow queries
B) Compresses data
C) Creates indexes automatically
D) Removes duplicate documents
12.) Which MongoDB operation locks the database during execution?
A) find()
B) updateMany()
C) createIndex()
D) countDocuments()
13.) How does journaling help in MongoDB?
A) Improves write performance
B) Provides crash recovery
C) Increases indexing speed
D) Reduces disk usage
14.) Which tool allows you to analyze MongoDB performance over time?
A) mongos
B) mongotop
C) Ops Manager
D) mongoexport
15.) What is the default port for MongoDB?
A) 3306
B) 5432
C) 27017
D) 8080
16.) What is the main advantage of a TTL index in MongoDB?
A) Reduces query time
B) Automatically deletes old documents
C) Prevents duplicate records
D) Improves write performance
17.) Which read concern level ensures only committed data is read?
A) local
B) snapshot
C) available
D) majority
18.) What is the role of balancer in MongoDB sharding?
A) Distributes queries among shards
B) Compresses large documents
C) Deletes unused indexes
D) Moves data between shards
19.) Which MongoDB command provides statistics about memory usage and index efficiency?
A) db.stats()
B) db.collection.stats()
C) db.serverStatus()
D) db.indexStats()
20.) How can you distribute query load across multiple replica set members?
A) Use a load balancer
B) Increase the number of indexes
C) Set read preference to secondary
D) Use a primary-only read preference
Related