Skip to content
In this guide

Guide · Every panel

Plan tab

The Plan tab is Pro. Run a statement, then click Plan in the result pane. Seqora runs its own EXPLAIN, never your run, as Why is this query slow? describes.

  • EXPLAIN or EXPLAIN ANALYZE, with execution and planning time and work_mem once analyzed. Cancel while the analyze runs.
  • Analyze in rollback on a write: "Runs the statement inside BEGIN … ROLLBACK". On a locked connection it is disabled with The connection is locked read-only. On a statement Seqora can't prove read-only it first asks Run this statement to analyze it?, since sequence values, trigger side effects and locks are not undone, and Run and roll back needs RUN typed on production.
  • Capture the plan again, or SQL changed once the editor text no longer matches the plan.
  • Plan lens: Flow and Time map. Estimates shows planner estimates as dashed outlines, on analyzed plans only.
  • Raw plan JSON, with Copy.

Before a run the tab reads No plan yet. After a failed run, No plan captured; after a cancelled one, Run cancelled; each with Capture estimate, which plans the statement without running it. The lens you chose survives a restart.

Row flow

Nodes run right to left. A band's width is the rows leaving a node, multiplied out over loops.

  • N is actual rows, ≈N an estimate.
  • A dashed ghost band is the estimate, drawn when it is off by more than 2×. ┅ N labels it once the error passes 10×.
  • ↻ ×N under a band counts loops.
  • −N below a scan is rows a filter threw away.
  • A spill label marks a node that wrote to disk.

The slow query's row flow, each notation marked once.

The slow query's row flow, each notation marked once.

  1. The band into the scan: the rows it read.
  2. 207K ┅ 612: actual rows, then the ghost estimate.
  3. −11.8M: the filter's drain.
  4. ↻ ×207K ┅ ×612: loops, actual and estimated.
  5. 1.64 s: self time.
  6. The result end, off to the right.

Beside each scan, a table wheel: the rim is the table's pages, the hub the index, spokes the lookups or page bitmap, an arrow a full scan. Double-click one for the TABLE WHEEL guide.

Time strip

Where the time went, or Where the cost is without timings: one segment per node, plus Planning, JIT, Triggers and Serialize. Hover for Self time or Self cost, Share, With inputs, Rows, Est. rows, Loops, Spilled.

Inspector

Click a node:

  • Rows or Estimated rows: read against kept, or in against out.
  • Rows per loop and Loops: on target, or the factor more or fewer.
  • Pages: cache, disk and temp reads, all cached or the share from disk.
  • Memory: shown when the node spilled, with the work_mem mark.
  • Indexes · <table>: each index tagged ✓ used, invalid, not chosen, not leading or partial. A suggested index has Test, which plans again with a hypothetical index and prints the cost before and after. heap order sketches the correlation.
  • Conditions: Filter, Index Cond.

The inspector for Seq Scan on orders.

The inspector for Seq Scan on orders.

  1. Rows: read against kept.
  2. Rows per loop: no Loops ruler, because the scan ran once.
  3. Pages: cache against disk.
  4. Indexes · orders: every index, tagged.
  5. suggested, with Test.

Findings

Badges on nodes match the list, or No findings.

  • Seq Scan on <table>: Test index on PostgreSQL, Copy CREATE INDEX on the other engines.
  • Estimate off N×: Copy ANALYZE <table>.
  • <node> spilled to disk and Bitmap went lossy: Retry · <work_mem> on PostgreSQL reads.
  • Fewer workers launched.

Per engine

Engine Plan tab
PostgreSQL Everything above. Test and Test index need hypopg.
MySQL Needs 8.0.18 or later. Reads only are analyzed.
MariaDB Reads only are analyzed.
SQLite EXPLAIN QUERY PLAN, estimates only.

Last checked against Seqora 0.3.2 on .

Found a bug, missing a feature, or just curious? Write to me. Every email lands in my own inbox, not a ticket queue.