Data & connectionsGuide

The SQL workbench

The workbench is a database client inside the project. Open a PostgreSQL or MySQL connection and you get its tables in a tree, query tabs with completion from the real schema, a grid where you edit rows and apply them as one reviewed batch, and a history that can undo what it ran.

9 min readBefore this: IntegrationsOpen in Waiso
What you will learn
  • Open the workbench and run a query in a tab
  • Browse a table, filter it and edit rows with a reviewed apply
  • Read the warnings a query gets and why
  • Find and revert past operations in the history

How the workbench is laid out

On Integrations, a database card’s Open takes you to its workbench. The left side is the schema tree — Tables open by default, Views, Functions and Procedures folded — with a search box and Refresh schema. The middle holds tabs, and a history drawer opens on the right.

docs-demoIntegrationsshop_dbHistory
shop_dbpostgres / docs_demo
Tables2
customers5
orders12
Views0
Functions0
Procedures0
customers
Add row
1SELECT *2FROM customers3LIMIT 100;
5 rows · 4 msRun Ctrl ↵
The schema tree on the left, a table tab open in the middle, its filter bar and row limit above the grid.
TabOpened byWhat it shows
Query+ → New queryA SQL editor and the result grid under it
Table / viewClicking a table or view in the tree, or picking it in the + menuIts rows with filter, columns, sort and editing
RoutineClicking a function or procedureIts definition, a parameters grid and a run button

The + menu also searches every table, view, function and procedure by name, so a large schema is one keystroke away. The workbench opens the first table by itself the first time you visit.

Run a query

  1. Open a query tab

    Click + and New query. The editor completes table and column names from the schema it loaded.

  2. Write and run

    Press Run or Ctrl+Enter (⌘+Enter on a Mac). The grid shows the rows, the row count and the time the database took.

  3. Read the warnings

    Above the grid, yellow lines say what could make the query costly. They never stop it from running.

SQLtop-customers.sql
SELECT c.name, COUNT(o.id) AS orders, SUM(o.total) AS revenue
FROM customers c
JOIN orders o ON o.customer_id = c.id
WHERE o.created_at >= now() - interval '30 days'
GROUP BY c.name
ORDER BY revenue DESC
LIMIT 20;

Browse and edit a table

A table tab reads the table with a Filter (column, operator, value), a Show picker for the columns you want, sorting by clicking a header, and a Limit of 50, 100, 200 or 500 rows — 100 by default. Show SQL reveals the exact SELECT it sends.

Edits wait until you apply them

  1. Change what you need

    Double-click a cell to edit it, use Add row (the form marks required fields and lets an auto-increment key be generated), or select rows and delete them. Nothing is written yet: each change is highlighted, and a bar says Editing · 3 changes.

  2. Review the SQL

    Click Apply. A confirmation shows SQL to be executed — every INSERT, UPDATE and DELETE built from your edits.

  3. Apply or cancel

    Apply changes runs the batch and reloads the tab; Cancel on the bar throws every pending edit away.

The tree’s right-click menu creates and changes structure: Edit table opens the table designer (columns, types, primary key, required, default, foreign keys, indexes) with the Generated SQL shown before you apply; Truncate data and Delete table ask first.

Warnings and row limits

Every query is read before it runs and timed after. The answer carries a list of warnings — empty when the query is clean — and the workbench always shows them:

The query…Warning
has no LIMITQuery has no LIMIT clause — this may return a very large result set
asks for more than 500 rowsQuery LIMIT 1000 exceeds the maximum of 500 rows
uses CROSS JOINQuery contains CROSS JOIN which may produce a very large result set
has three or more JOINsQuery contains 3 JOINs — consider whether all are necessary
took more than 3 s / 8 sQuery took 4210ms (>3s) / (>8s)

The cap only wraps plain reads (SELECT and WITH). Statements that write — INSERT, UPDATE, DELETE, CREATE, ALTER, DROP — run as written.

History and revert

The Query history button opens every operation run against this connection, newest first, with its status (Succeeded, Failed, Reverted), its time and What was executed. The history is kept on the server per connection — the last 200 entries — so a teammate opening the same workbench sees it too.

  • Row edits, inserts, deletes, truncates and dropped tables record the SQL that undoes them. Such an entry is marked Revertible.
  • Reverting shows Revert SQL to be executed first; confirming runs it and adds a new entry marked with ↩, linked to the original.
  • A revert restores data, not time: rows another process changed in between are not merged.

Limits and access

  • PostgreSQL and MySQL only. S3 connections open the file browser instead.
  • Running queries needs Edit access to Integrations in the project; see Team access.
  • MySQL hides a routine’s body from anyone but its DEFINER. Grant ALTER ROUTINE to the connection’s user to read definitions.