Back to skills

mongodb-query-optimizer

data

Diagnoses slow MongoDB queries and recommends indexes based on explain plans, existing collection indexes, and Atlas Performance Advisor output. Follows the ESR rule (Equality, Sort, Range) for compou

Setup & Installation

npx skills add https://github.com/mongodb/mongodb-query-optimizer --skill mongodb-query-optimizer
or paste the link and ask your coding assistant to install it
https://github.com/mongodb/mongodb-query-optimizer
View on GitHub

What This Skill Does

Diagnoses slow MongoDB queries and recommends indexes based on explain plans, existing collection indexes, and Atlas Performance Advisor output. Follows the ESR rule (Equality, Sort, Range) for compound index suggestions and prefers index coverage over query rewrites. It pulls real explain() stats and Performance Advisor data from your cluster instead of guessing from the query shape, so index suggestions match actual selectivity and workload.

When to use it

  • Working with mongodb query optimizer functionality
  • Implementing mongodb query optimizer features
  • Debugging mongodb query optimizer related issues