SQL playground
Multi-tab SQL editor with typed parameter prompts, plan history, watch mode, and inline result charts.
Tabs and parameters
-- Use $1, $2, … and Studio prompts you for each parameter.SELECT id, email, created_atFROM usersWHERE created_at > $1 AND email ILIKE $2ORDER BY created_at DESCLIMIT $3; -- Studio shows three input fields above the editor — typed by usage.-- $1 is treated as timestamptz; $2 as text; $3 as int.Tabs persist per-connection. Closing Studio doesn't lose them — they're saved to ~/.zanith/studio/tabs.json on the host running Studio.
Plan and history
| Action | What runs |
|---|---|
**Run** (⌘↵) | adapter.executeRaw(sql, params). Goes through the plugin chain — Studio's own activity feed will show it. |
**Plan** (⌘P) | Wraps the query in EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON). Result is a tree view, not raw text. |
| **History** | Sidebar shows every query run on this connection (across tabs). Click an entry to load it into the current tab. |
Watch mode
Toggle watch on a tab to re-run the query at a chosen interval. Useful for monitoring counts during a backfill, polling a job table, or watching connection counts climb during a load test.
-- Toggle watch (1s polling) on a query like this to monitor backfill progress.SELECT count(*) FILTER (WHERE migrated_to_v2) AS done, count(*) FILTER (WHERE NOT migrated_to_v2) AS remaining, 100.0 * count(*) FILTER (WHERE migrated_to_v2) / count(*) AS percentFROM orders;Inline charts
When the result has a numeric column and either a timestamp or a category column, Studio offers chart options under the results table — line, bar, area. The chart reads from the current result; re-running the query re-renders it.
-- Returns a series Studio will offer as a line chart.SELECT date_trunc('hour', created_at) AS hour, count(*)FROM ordersWHERE created_at > now() - interval '24 hours'GROUP BY 1ORDER BY 1;Saved queries
Right-click a tab → Save as snippet. Snippets live in ~/.zanith/studio/snippets/; commit them to your repo if your team should share them.