Reading a plan

functional

The Summary, Diagram, Operators and Time views, the details panel, and the keys that move around a plan.

The plan pane has four views, switched with the buttons in its header: Summary, Diagram, Operators and Time. They all show the same plan, and one operator selection is shared between them: pick a step in the Summary and the Diagram, the Operators table and the Time chart all select it too.

Summary

The Summary is the plan told as a story. At the top, one sentence says what the query did: “This query read from customers, orders, order_items and products and returned 20 rows in 467 ms.” A few short notes follow when they matter (operator times that add up to more than the run time because of parallel threads, the largest estimate miss, a step that spilled to disk), then the bottleneck: the step that cost the most, with its own time, its share and how many rows it read to return how many.

Below that, What the query does, in order lists every operator as a numbered step in the order the work happens, from the first table read to the final sort. Each step has a sentence (“Scans orders and returns 270K rows”) and notes about its filter, the rows it discarded, how many times it ran, its time and page reads, memory, spills and parallel workers. A bar shows its share of the statement. Steps too small to matter are folded away; Show minor steps (n) brings them back.

  • The Bottleneck badge appears only when one step really dominates. When no step does, the slowest one is named without it.
  • On the right, the Findings list the problems worth fixing, ranked. See Findings and fixes.
  • ↑ and ↓ move between steps, Enter or Show in diagram jumps to the selected step in the Diagram, and Esc clears the selection.
  • A batch with several statements gets a tab per statement.

Diagram

SQLly
SQLly plan diagram with operator cards, a minimap and the details panelSQLly plan diagram with operator cards, a minimap and the details panel
The Diagram: operator cards coloured by time, thicker connectors where more rows flow, the parallel section outlined, the bottleneck marked, and the selected operator's details on the right.

Each operator is a card with its name, its table and index, the rows it returned, its time (or cost, for an estimated plan) and its share of the statement. The toolbar above the canvas sets how it looks:

  • Color by Time, Cost, Rows, Estimate error or Page reads. The legend in the corner explains the scale.
  • Top down / Left to right flips the layout.
  • −, + and Fit zoom; drag to pan. The minimap in the corner shows where you are in a large plan and moves the view when you click or drag in it.
  • Find operator, table or index searches the cards and shows how many matched.

Connectors are thicker where more rows flow, the heaviest path through the plan is drawn as a highlighted line, and sections that run on parallel workers are outlined with how many workers started. The heaviest operators carry a text badge, so colour is never the only signal. A card has a warning mark only when a finding listed beside the plan points at it. Click a card to select it; long titles end in an ellipsis and show in full on hover.

KeyIn the Diagram
Arrow keysWalk the tree the way it is drawn: towards the parent, a child, or the previous or next sibling. The first press selects the root.
Enter or SpaceFold or unfold the selected operator's branch.
+ / −Zoom in and out.
0Fit the whole plan in the pane.
EscClear the selection.

The details panel

Selecting an operator in any view fills the panel on the right. It starts with what the operator did in this plan, in sentences (“Uses the index products_pkey to find rows in products and returns 154K rows. Keeps only rows where category = 'games', which discards 810K rows”), then explains what that kind of operator is and when it is slow. Those explanations come from a built-in glossary of about 700 operators across ten engines, from SQL Server's Key Lookup to Oracle's TABLE ACCESS BY INDEX ROWID.

After that come the numbers (own time, time with inputs, share of the total, cost, rows, estimated rows, how far off the estimate was, loops, rows discarded, page reads, memory), the predicates in readable form, the findings that point at this operator, and the raw properties the engine reported, which Hide engine properties folds away. Table aliases are shown with the real table name when the query text or the connection's known tables make that possible.

Estimated plans and plans without timings say what is missing instead of showing empty columns, and per-step times are not used for ranking when a statement is too short for them to be more than rounding noise.

Operators

SQLly
SQLly plan Operators tableSQLly plan Operators table
The Operators view: every operator in a sortable table with step number, table and index, own time, time with inputs and share of the total.

The Operators view is the whole plan as a table, one row per operator, using the same grid as query results. Click a column heading to sort (by own time to find the expensive steps, by estimate error to find the bad guesses), select a row to see its details, and copy or export the table like any result.

Time

SQLly
SQLly plan Time view with an icicle chart and breakdownsSQLly plan Time view with an icicle chart and breakdowns
The Time view: an icicle chart of the operator tree where each bar's width is its share of the statement, above totals by operator, by kind of work and by table.

The Time view answers “where did it go?” at a glance. The icicle chart puts the root at the top; each bar is an operator, its width is its share of the statement including everything under it, and the operators it reads from sit beneath it. Click a bar to select that operator. An estimated plan uses cost instead of time.

Below the chart, three breakdowns add the same numbers up differently:

  • By operator: the most expensive operators first.
  • By kind of work: seeks, scans, sorts, hash joins, nested loops, aggregates and so on, so you can see that 64% of the time was index seeks even when it is spread over several operators.
  • By table: which tables the time was spent reading.