VisuaLeaf draws your database's execution plan as a flow of steps, shows what each step costs on its own and lights up the one that matters. It works the same way on SQL databases and on MongoDB queries and aggregations, sharded clusters included.
The plan reads left to right, from the tables to the result. The thicker a connection, the more rows pass through it. Each step shows its own cost, not the cost of everything underneath it, so only the step that does the work lights up and the steps above it stay quiet.
Above the plan, VisuaLeaf says in plain words what is slow and why: here, a full scan of payments inside a subquery that runs once for each of ~484 rows, 97% of the cost. Copy index puts a CREATE INDEX for it on your clipboard. Click any step to see the lines of your query it comes from, its condition and its numbers. Click a connection to select the two steps it joins.
Switch to Tree to see the same plan top-down, with the result at the top and its inputs spreading out below. Each card shows rows, cost and how many times the step runs, with a ring for its share of the total. A long plan continues in a second column instead of shrinking into a thin strip.
On MongoDB, the plan comes with measured times. Shards that ran the same steps merge into one lane marked ×3, with their counts added up, and the whole pipeline is there, including the stages that run after the shards are merged. The panel on the right compares keys read, documents read and documents returned, and shows what each shard read and how long it took.
Small pass-through steps fold into their neighbours and repeated shard lanes merge, so a 39-step sharded plan fits on one screen. Turn off Merge lanes or Fold small steps to see every step on every shard. The tree shows Returned, Examined and Keys for each stage, and a dash where MongoDB reports no number.
Check out the documentation to read more about Explain and discover more VisuaLeaf features.
Read the DocumentationGet started free with our Community Edition. Includes a 14-day trial of Pro features.