The document discusses MongoDB performance tuning. It begins by distinguishing between optimizing, which involves restructuring applications and data, and performance tuning, which experiments with system modifications. It recommends investigating performance using log files, the profiler, and explain queries. Creating an index on first_name and last_name fields improved the performance of a query searching on first_name from 480ms to 7ms by enabling an index scan instead of a collection scan. The document suggests continuing performance monitoring and investigating other issues at future meetings.
4. Performance Tuning vs Optimizing
âą Optimizing â Opportunity to restructure
your application, data model, and
queries
âą Performance Tuning â Experiment and
modify system
5. Hardware
CPU / RAM / HDD / OS
Topology / Network / Hosting
Application
Input - sources of write traffic
Output - sources of query load
Schema
MongoDB
Replica-set configuration, tags, read & write concern
Shard configuration, tags, shard keys
Where to Focus?
9. Explain Levels in MongoDB 3.x
âą queryPlanner (default level): runs the query planner and chooses the winning plan without
actually executing the query
â Use case: "Which plan will MongoDB choose to run my query?"
âą executionStats â runs the query optimizer, then runs the winning plan to completion
â Use case: "How is my query performing?"
âą allPlansExecution â same as executionStats, but returns all the query plans, not just the winning
plan.
â Use case: "I want as much information as possible to diagnose a slow query."
21. To Be Continued⊠Questions?
When?
âą Next MUG
âą Focus Point?
âą Which other performance issues would you like to talk about?
What else can I check?
MongoDB University Free Courses ( https://university.mongodb.com/ )
âą M201: MongoDB Performance
âą M312: Diagnostics and Debugging