Blog Post

PlanTrace: Stop Reading Redshift EXPLAIN Plans. Start Seeing Them

,

PlanTrace: Stop Reading Redshift EXPLAIN Plans. Start Seeing Them

Introducing PlanTrace — a free, browser-based tool that turns raw execution plans into interactive graphs and actionable tuning insights.

plantrace.studyyourdata.com

PlanTrace graph view showing an interactive execution plan with color-coded cost nodes, arrows, and the insights drawer open

PlanTrace graph view — color-coded cost nodes, execution flow arrows, and the tuning insights drawer, all in one screen.

If you work with Amazon Redshift, you've been there. You run EXPLAIN on a slow query,

and you get back something like this:

XN Limit  (cost=2000000000000.00..2000000000125.00 rows=100 width=256)
  ->  XN Merge  (cost=2000000000000.00..2000000000125.00 rows=100 width=256)
        ->  XN Hash Join DS_DIST_BOTH  (cost=384729183746.25..903741293847.50 rows=32000000000 width=256)
              Hash Cond: ("outer".customer_id = "inner".customer_id)
              ->  XN Hash Join DS_BCAST_INNER  (cost=182938471623.00..723481920384.00 rows=28000000000 width=224)
                    ...

Now imagine 80+ operators deep. Nested joins, multiple redistributions, broadcasts stacked on top of each other,

costs in the trillions. You're supposed to manually scan this and figure out what's killing performance.

Execution plans are not logs. They are structured graphs of data movement and compute decisions.

They deserve to be treated that way.

That's why I built PlanTrace.


What PlanTrace does

PlanTrace takes your raw EXPLAIN output, parses it into a structured tree,

and gives you three ways to reason about it — all in your browser, with no data ever leaving your machine.

The graph view

The moment you paste a plan and click Visualize, PlanTrace renders it as an interactive

graph — nodes for every operator, arrows showing execution flow, and a minimap for large plans.

Each node is color-coded by cost intensity using a 6-level semaphore — from green (cheap) to red (expensive).

You stop reading plans. You see them. Hotspots are obvious in seconds.

Hover over any node to see operator documentation inline, distribution movement notes

(DS_BCAST_INNER, DS_DIST_BOTH, etc.), and cost range, estimated rows, and output width.

Click a node to pin its detail panel — useful for digging into join conditions without losing your place in the graph.

The table view

PlanTrace table view showing sortable columns with color-coded cost pills for each operator

Table view — sortable by any column, with cost severity pills making hotspots immediately visible.

Not a graph person? The table view flattens all operators into sortable columns — cost, rows, width, distribution code.

Sort by total cost to instantly surface the most expensive operators. Toggle tree-order mode to preserve the

parent/child structure while keeping sortable columns.

The cost severity pills make it hard to miss the bad stuff — red means it's on fire, and in a real production

query, you'll know immediately which joins to attack first.

The chart view

PlanTrace chart view showing operators plotted on a cost vs estimated rows scatter chart with quadrant labels

Chart view — each dot is a plan operator. Top-left quadrant (high cost, few rows) flags overestimated work that needs ANALYZE. Dot size encodes row width.

The chart view plots every operator on a cost × estimated-rows scatter chart (both log scale). Four quadrants

tell you immediately what kind of problem you're dealing with:

  • Top-left (Overestimated Work) — high cost, few rows. Run ANALYZE — statistics are likely stale.
  • Top-right (Balanced) — high cost, many rows. Expected for big operations; focus on join strategy.
  • Bottom-left (Ideal) — low cost, few rows. This is what you're aiming for.
  • Bottom-right (Cardinality Risk) — low cost estimate, many rows. Potential runtime spill.

Dot size encodes row width, so you can also spot wide rows that will blow up memory. Hover any dot for the full operator detail.

The operator legend

PlanTrace operator legend modal showing the Join operator documentation

Every operator type has built-in documentation — click the legend to understand exactly what each operator does and when it becomes a problem.

One of the things I wanted PlanTrace to be is educational, not just diagnostic.

Every operator type in the legend links to inline documentation explaining what it does, when it's fast, and when it's a problem.

You don't need to have the Redshift docs open in a second tab.

The insights engine

This is the part I'm most proud of. PlanTrace runs a rule-based insight engine across your plan

and surfaces prioritized, actionable recommendations sorted by severity — as many as the plan warrants.

On a complex query, you might get 14 or more distinct findings.

To give you a sense of what it catches, here's what it found on a real monster query — 118 operators, 27 tables, costs reaching 2 trillion:

118Total operators
14Tuning insights
2TMax total cost
27Tables involved

The engine flagged, among other things:

  • A redistribution chain of 6 DS_DIST_BOTH joins in the same branch — at least 6 full-cluster redistributions before any result is produced
  • 14 broadcast joins (DS_BCAST_INNER), several of them on fact-sized tables with hundreds of millions of rows
  • 8 direct fact-to-fact joins without pre-aggregation — a classic source of runaway cost
  • A useless sort inside a subquery feeding directly into a hash join, which discards sort order anyway
  • Scan amplification of 10,000,000× on one table — reading 1 billion rows to return 100
  • 27 tables flagged for ALTER DISTSTYLE AUTO with ready-to-run SQL for each

Every insight is tied to an actual signal in the plan, no generic advice, no "consider your indexes" stuffs.

PDF export

Once you've analyzed a plan, click ? PDF in the toolbar.

PlanTrace generates a formatted A4 report with an executive summary, all insights with severity color bands,

an operator distribution quadrant breakdown, and the top 10 most expensive operators.

It's a ready-to-share document you can drop into a Slack thread, attach to a Jira ticket,

or present to your team without having to explain what an EXPLAIN plan is.

Privacy by design

PlanTrace is entirely client-side. Your query plans never leave your browser.

No backend, no analytics on your plans, no storage. Paste your plan, get your insights, close the tab —

nothing is retained.

This matters because EXPLAIN output often reveals table names, column names, join structures, and data volumes

that you probably don't want floating around in some SaaS vendor's logs.


How to use it

  1. Go to plantrace.studyyourdata.com
  2. Run EXPLAIN <your query>; in your Redshift client and copy the output
  3. Paste it into the left panel and click Visualize
  4. Switch between Graph / Table / Chart views
  5. Open the insights drawer for tuning recommendations
  6. Download the PDF if you want a shareable report

It's free. No account required. No install.

What it's not

PlanTrace is deliberately focused. It is not a query runner, not a monitoring dashboard,

and not a replacement for runtime telemetry from views like SVL_QUERY_SUMMARY

or STL_ALERT_EVENT_LOG. Those require a live connection and runtime execution data

that EXPLAIN alone can't provide.

PlanTrace's job is narrower and more immediate: take a plan you already have, make it

understandable, and tell you what to look at first.


PlanTrace is free to use — no account, no install, no data leaves your browser.

plantrace.studyyourdata.com ?

If you work with Redshift and have a slow query you've been staring at, paste the EXPLAIN output

and see what PlanTrace finds. I'd love to hear what you think — drop a comment below or find me on LinkedIn.

Original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating