zanith

studio / sql

When the grid runs out,
write SQL.

Multi-tab editor, EXPLAIN plan history, watch mode, result charts — on the same connection your app uses.

zanith studio — sqlpostgres · prod
top orgsrevenue+▶ run
SELECT o.name, count(u.id) AS users, sum(p.amount) AS rev
FROM orgs o JOIN users u ON u.org_id = o.id
JOIN payments p ON p.user_id = u.id
GROUP BY o.name ORDER BY rev DESC;
● 4 rows12.4 ms
nameusersrev
acme41218,204
globex2719,880
initech1464,002
umbrella881,210
multi-tab·EXPLAIN history·watch mode·result charts

02 — The editor

Four small things that compound.

Multi-tab

Open as many SQL tabs as you need. Each tab keeps its own SQL, history, plans, and result.

:name parameters

Write `WHERE created_at > :since` and Studio prompts you for the value. The CLI does the same.

History per tab

Last 50 statements, scoped to each tab. Up-arrow scrolls through them.

Saved queries

Workspace-scoped or per-connection. ⭐ a query and pin it to the sidebar.

Plans + watch

Why is it slow?
Watch it get fast.

EXPLAIN, read like a tree. The plan rendered as a tree, the expensive node lit — not a wall of text.

Plan history. Every run is kept. Add an index, run again, and the before/after sits side by side.

Watch mode. Re-run on an interval and tail the timing — watch a fix take hold live.

EXPLAIN ANALYZEwatch · every 5s · run #37
Limitcost 0.42
└─ HashAggregatecost 18.0
└─ Index Scan · users_email_idxcost 8.1

plan history

#1Seq Scan on users412 ms
#2Index Scan · after CREATE INDEX8 ms−98%

04 — Charts in place

Toggle the result into a chart.

Pick an x, an aggregate for y, bar or line — render it right in the result pane. No run-copy-paste-into-another-tool cycle.

result · revenue · grouped by day table chart

x · group by

created_day

y · aggregate

SUM(amount_cents)

kind

bar · line

All client-side — the chart re-renders from the rows you already fetched, so flipping back and forth costs nothing.