What problem does it solve?
This Skill helps users efficiently manage and interact with MongoDB databases, from designing schemas and writing queries to optimizing performance and understanding best practices.
Core Features & Use Cases
- Schema Design: Guidance on embedding vs. referencing, subset pattern, bucket pattern, and schema versioning.
- Query Optimization: Advice on projections,
$elemMatch, $in, $exists, $type, and avoiding slow operators.
- Aggregation Framework: Best practices for building pipelines, using
$match, $project, $group, $lookup, $facet, $merge, and $out.
- Index Management: Strategies for creating compound indexes, auditing index usage, partial indexes, TTL indexes, and dropping unused indexes.
- Pitfall Avoidance: Warnings against unbounded arrays, unindexed queries, leading wildcard regex, and frequent updates to indexed fields.
Quick Start
Use the mongodb skill to explain how to create a compound index for equality, sort, and range fields.