What problem does it solve?
Helps developers and DBAs identify why MongoDB queries are slow and recommends targeted index and query-plan changes to reduce latency, scanned documents, and in-memory sorts.
Core Features & Use Cases
- Explain plan analysis: Interpret explain() output to detect COLLSCAN, in-memory sorts, and high keys/documents examined ratios.
- Index recommendations: Propose compound indexes following ESR/ERS ordering and advise when to remove or consolidate indexes based on Atlas Performance Advisor.
- Cluster-level diagnosis: Use Atlas Performance Advisor and slowQueryLogs (when configured) to prioritize high-impact slow queries across a cluster.
- Aggregation and update guidance: Provide pipeline optimizations and oplog-efficient update patterns when relevant.
- Reference-driven: Loads core indexing principles and antipattern examples to ground recommendations in proven best practices.
Quick Start
Ask the skill to analyze the slow query db.orders.find({status: 'shipped', region: 'US'}).sort({date: -1}) and recommend the minimal index changes and reasoning.