Get Started Free

Paste & go

Run .explain("executionStats") in the shell or Compass, paste the JSON, and hit Visualize.

See the bottlenecks

Spot COLLSCANs, index usage, docs vs. keys examined, and per-stage timings at a glance.

Stays in your browser

Your query plan is parsed locally and never uploaded anywhere.

More information about MongoDB explain plans

An explain plan is MongoDB's report of how it executed a query, which indexes it used, how many documents and index keys it examined, and how long each stage took. Reading explain output is the single most important skill for diagnosing slow MongoDB queries, and it's how you decide which indexes to add.

What is explain("executionStats")?

Running db.collection.explain("executionStats").find(...) returns the winning query plan plus real execution numbers: nReturned, totalDocsExamined, totalKeysExamined, and per-stage timings. Visualizing it as a tree makes the bottleneck obvious.

Reading the plan

Frequently asked questions

What does COLLSCAN mean?

A collection scan, MongoDB read every document because no suitable index existed. On large collections this is slow; adding an index that supports the query usually turns it into an IXSCAN.

How do I know if my query uses an index?

Look for an IXSCAN stage (with an indexName) rather than a COLLSCAN, and check that totalKeysExamined is close to nReturned.

Is my query plan uploaded anywhere?

No, the plan is parsed entirely in your browser and never sent to a server.

VisuaLeaf

Profile queries live in VisuaLeaf

VisuaLeaf's Query Profiler runs explain for you and visualizes plans right next to your data, with no copy-paste, across MongoDB and SQL, alongside the visual query builder, schema diagrams, and charts.

MongoDB & SQL in one client
Visual query & aggregation builders
Live visual schema diagrams
Charts, dashboards & query profiler
Connection manager for local, cloud & teams
Free Community Edition