QueryDeck Docs
Querying

Query editor

Run, edit, and explore SQL with autocomplete, multi-tab, and one-click EXPLAIN.

For: everyone. The query editor is the screen where you spend the most time.

The query editor opens automatically when you connect. Type SQL, press Cmd+Return, and the result lands in the grid below.

Run a query

ActionShortcut
Run everything in the current tabCmd+Return
Run only the selected textCmd+Shift+Return
Cancel the running queryCmd+.

When nothing is selected, Cmd+Return sends the entire tab to the server. To run a single statement out of a longer file, select it first then Cmd+Shift+Return.

Tabs

Each tab is its own SQL buffer with its own result. Tabs are tied to a connection — switching connections opens a fresh tab against the new database.

ActionShortcut
New tabCmd+T
Close tabCmd+W
Switch to tab 1, 2, ... 9Cmd+1 through Cmd+9

Tabs survive app restarts. If you close QueryDeck mid-query, you'll find your draft when you reopen.

Autocomplete

Start typing a table or column name and the suggestion popup appears. QueryDeck is smart about scope:

  • In a FROM or JOIN clause it suggests every table in the active schema.
  • After you've named a table in FROM/JOIN it limits column suggestions to that table only. Type users. and you get only the columns on users.
  • In a SELECT clause before a FROM, it suggests every column from every table you've referenced so far.
  • Keywords like SELECT, WHERE, JOIN, GROUP BY complete in context.

Press Tab to accept a suggestion, Esc to dismiss the popup.

EXPLAIN ANALYZE in one click

Right-click anywhere in your query, choose Explain Query. QueryDeck runs EXPLAIN ANALYZE and renders the plan as a tree below the editor. Each node shows its cost, actual rows, and time spent. See Query Plan Visualizer.

Format SQL

Cmd+Shift+F reformats the current tab. Keywords go uppercase, indentation is normalized, statements are spaced. Useful when pasting unformatted SQL from a log or Slack thread.

Find and replace

Cmd+F opens the find bar. Cmd+Option+F opens find-and-replace. Both support regex.

Multi-cursor editing

Option+Click adds a cursor. Edit several lines at once when you're renaming an alias across a long query.

Auto-uppercase keywords

By default, QueryDeck auto-uppercases SQL keywords as you type. select becomes SELECT the moment you hit space. Turn it off in SettingsEditor if you prefer to write keywords yourself.

Comments

ActionShortcut
Toggle line commentCmd+/
Block comment selectionCmd+Option+/

PostgreSQL and MySQL both accept -- single-line and /* block */ comments.

Results below the editor

Every successful query writes a result tab below the editor. The grid:

  • Scrolls virtually, so 100K rows feel instant
  • Sorts by clicking a column header (ASC, DESC, none)
  • Filters per column from the column menu
  • Shows execution time and row count in the status bar
  • Renders JSON inline (click to expand), dates with locale, booleans as checkboxes, NULL as a gray badge

To copy out of the grid, select cells and Cmd+C. To copy a row as an INSERT statement, Cmd+Shift+C. See Export for the file options.

Running multiple statements

Separate statements with ;. QueryDeck runs them in order and opens one result tab per statement. If any statement errors, execution stops at that point.

Refreshing the schema

If you've changed the schema outside QueryDeck (a migration in another window, or a CLI tool), press Cmd+R to refresh the sidebar tree and the autocomplete index.

What's next