Skip to content
Documentation

Visual Explain โ€” read plans at a glance

Color-coded stage cards, cost ratio chips, and per-stage glyphs so the worst stage of a plan jumps out without reading JSON.

What it shows

Every aggregation/find plan renders as a tree of stage cards. Each card carries 4 visual signals: a colored 4px accent bar on the left (good/warn/bad grade), a glyph identifying the stage type (Key icon for IXSCAN, Warning for COLLSCAN, SortAscending for SORT, etc.), a chip with examined/returned ratio when docsExamined is available, and an index name chip for IXSCAN-family stages.

How to open it

  1. Open any workspace tab on a collection (Documents, Aggregation, etc.).
  2. Type your query in the Query Bar or build a pipeline in the Aggregation builder.
  3. Click "Explain" (top-right). The plan opens as a tree.
  4. Hover any cost-ratio chip to see WHY that stage got its grade (full collection scan, low selectivity, dominant time share, etc.).

Cost grades

NoSqlStudio grades each stage as good (efficient), warn (likely wasteful), or bad (definitely wrong) โ€” applied in priority order, first match wins:

ColorMeaningTrigger
๐ŸŸข GreenEfficient stageIXSCAN / EXPRESS_IXSCAN / IDHACK / FETCH
๐ŸŸก YellowLikely wasteful โ€” reviewSmall COLLSCAN, in-memory SORT, low index selectivity (<10%), stage dominates >30% of total time
๐Ÿ”ด RedDefinitely wrong โ€” fix before shippingCOLLSCAN over >1000 docs, in-memory SORT exceeding 32MB threshold

Reading the cost ratio chip

The chip shows "examined โ†’ returned ยท X%" โ€” the percentage of examined docs that actually came back. Rule of thumb:

  • > 50%: index is well-shaped for this query.
  • 10โ€“50%: borderline โ€” might be acceptable for ad-hoc queries; rebuild index for hot paths.
  • < 10% with examined > 100: warn โ€” index is the wrong shape (compound index missing, wrong sort order, etc.).

Worked example

Run this query against a 1M-doc orders collection that has no compound index:

db.orders.find({ status: 'paid', userId: ObjectId('...') })

You will see a red COLLSCAN card at the bottom of the plan ("Full collection scan over >1000 documents โ€” likely missing an index"). Create a compound index on { status: 1, userId: 1 } and re-run โ€” the plan now shows a green IXSCAN with a 99% cost ratio.