

Three results as tabs above the grid, the first one pinned
Naming
A result is named after the table it came from. When there is no single table, the statement names itself, and a line comment written above the statement wins over the SQL:monthly totals. Names longer than 28 characters are truncated with an ellipsis, and a result no statement stands behind is numbered by where it lands, Result 3 after two pinned results. Two results with the same name read users and users (2).
Choosing a result
With two to six results, a row of tabs above the grid shows one tab per result. Click a tab to show that result. A pinned result’s tab carries a pin. The result pull-down lists every result and holds the commands for the one on screen. With tabs it sits at the end of the tab row and reads 2 of 4. With one result it sits at the left of the bar under the grid and reads the result’s name. With more than six results, or a pane too narrow for the tab names, the row keeps only the pull-down.
Closing the result on screen shows the one that takes its place. Closing, clearing or switching away from a result with unsaved cell edits asks first.
The next query opens a new result instead of overwriting a pinned one. Pinned results cannot be closed or cleared until you unpin them.
Picking a result moves the editor cursor to the statement that produced it and unfolds that statement if it was collapsed. Picking the result already showing does nothing, so clicking between pinned results never moves the editor under you. A statement you have since edited away leaves the cursor where it is.
The results panel expands itself when a query runs. Query > Clear Results empties it and leaves the query alone; Query > Clear Query empties the editor and leaves the results. Both are also on the Run button’s menu.
Comparing two results
To check that a rewritten query returns the same rows, run the old one and pin its result, run the new one, then choose Compare Result With…. The result on screen is the left side. Pick the right side from any other result in the same tab, or from a pinned result in another query tab on any connection.- Key columns picks the columns that identify a row. A result read from one table with a primary key starts on that key.
- With no key column, whole rows match, and a row that appears twice on one side and once on the other leaves one copy unmatched. A row that differs in one value then shows as Only Left and Only Right.
- A key that matches more than one row in either result stops the comparison and names the key.
- Columns match by name. A column in one result only is listed over the grid and not compared.
- NULL matches only NULL. Two spellings of the same timestamp match.
- Show narrows the grid to differences, one status, or every row.
- A result cut off at the row cap is compared on the rows it holds, and the window says so. Click Fetch All first to compare every row.
How long it took
The bar under the grid reads the elapsed time of the last query, from sending it to having the last row. On a remote server, or through an SSH tunnel, most of a large result’s elapsed time is transfer rather than the query. Click the number for the split.
A long Transfer behind a quick Server or First row is a slow link or a wide result, not a slow query.
MySQL, MariaDB, PostgreSQL, CockroachDB, Redshift, ClickHouse and BigQuery report First row. BigQuery adds Server from its job statistics, and ClickHouse adds it on a query that returns no rows, where the summary arrives as a header the client sees. Every other engine shows the elapsed time on its own, and the number does not open.
The row cap
A query that returns rows and carries noLIMIT, FETCH FIRST or TOP of its own stops at the row cap: SELECT, WITH, TABLE, VALUES, and a set operation whose arms are parenthesised.
Your SQL reaches the server exactly as you wrote it. The cap applies to the rows read back, so a
query carrying its own LIMIT, FETCH FIRST or TOP is never touched, and EXPLAIN, SHOW,
writes and DDL are never capped. The read itself stops at the cap on MySQL, MariaDB, PostgreSQL,
CockroachDB, Redshift, SQLite, MSSQL, Oracle, Cassandra, Redis, DynamoDB, BigQuery, Snowflake, Trino, Presto,
ClickHouse, SAP HANA and MongoDB, so the rest of the result never crosses the network. Cloudflare D1, LibSQL,
Etcd, DuckDB, Elasticsearch, Typesense, SurrealDB, Beancount and Dameng still read the whole result and keep the
first rows. A plan that has to finish before it can return a first row, a sort with no index or a
GROUP BY, runs to completion on the server either way. Both numbers are in Settings > Data
(Data settings).
When the cap trims a result the status bar reads Showing N rows and offers Fetch All, which extends the result in place. To skip the cap for one run, press Cmd+Option+Enter or choose Run Without Limit from the Run button’s menu.
Statements that return no rows
INSERT, UPDATE, DELETE and DDL show a success view with the affected row count and the execution time. Two or more of them in one run share one result, named after how many there were, with the row counts and times added up.Server output
Lines a statement prints on the server show with that statement’s result.- A block or procedure call that returns no rows shows its lines under the success message.
- A query that returned rows and also printed gains an Output mode beside Data.
- A plan from
EXPLAIN ANALYZEor an actual plan gains Output beside its views, since the statement ran. See EXPLAIN Visualization. - Fetch All runs the query again and shows what that run printed.
- A statement that fails lists the first 20 lines it printed before the error, inside the error banner.
Failed statements
A failed statement shows a red banner above the results with the database’s own error message and a Fix with AI button. In a script, the statement that failed gets a result namedError, and the banner shows only on that result. Its banner has no dismiss button, since the error is all that result holds. See AI Assistant. A control character or zero-width space in the message shows as its short name in angle brackets, such as <BS>; see Invisible characters.
