Query Tabs
Every tab is an independent workspace with its own SQL content, results, pagination, sorting, and filter state. Open as many as you need. They persist across app restarts.
Tab Types
| Type | Icon | Purpose |
|---|
| Query Tab | Document icon | Write and execute custom SQL |
| Table Tab | Table icon (blue) | Browse table data with pagination and filtering |
Query tabs start with an empty editor. Type SQL and press Cmd+Enter to execute.
Table tabs open when you click a table in the sidebar. They provide server-side pagination, inline editing with change tracking, structure view, and filter support.
Table tabs are editable by default. Query tabs are read-only unless the query is a simple SELECT * FROM table statement.
Smart Tab Reuse
Clicking the same table switches to its existing tab. Clicking a different table opens a new tab.
Enable Reuse clean table tab in Settings > Tabs for TablePlus-style behavior: clicking a different table replaces the current table tab if it has no unsaved changes, no user interaction, and is not pinned.
Preview Tabs
Single-clicking a table opens a temporary preview tab that gets replaced when you click a different table (like VS Code’s preview tabs). Preview tabs show “Preview” in the window subtitle.
A preview tab becomes permanent when you:
- Double-click a table in the sidebar
- Interact with the tab (sort, filter, edit data, select rows)
Preview tabs are not saved across restarts.
Disable preview tabs in Settings > Tabs if you prefer every click to open a permanent tab.
Managing Tabs
Creating Tabs
| Action | How |
|---|
| New query tab | Cmd+T or click + in the tab bar |
| New query tab (toolbar) | Click the SQL button |
| New table tab | Click a table name in the sidebar |
Closing Tabs
| Action | How |
|---|
| Close current tab | Cmd+W |
| Close specific tab | Hover and click x |
| Close other tabs | Right-click > Close Other Tabs |
Closing a tab with unsaved changes discards those changes. TablePro warns you before closing if there are pending data modifications.
Switching Tabs
Cmd+1 through Cmd+9 to jump by position
Cmd+Shift+[ / Cmd+Option+Left for previous tab
Cmd+Shift+] / Cmd+Option+Right for next tab
Each tab preserves its full state when you switch away: SQL content, cursor position, results, scroll position, selected rows, sort/filter state, and pending changes.
Reordering Tabs
Drag any tab to a new position. The tab bar scrolls horizontally when tabs overflow.
Pinning Tabs
Right-click a tab > Pin Tab. Pinned tabs:
- Cannot be closed via close button,
Cmd+W, or context menu
- Are not closed by Close Other Tabs
- Are not replaced by table tab reuse
- Persist across sessions
Unpin via right-click > Unpin Tab.
Duplicating Tabs
Right-click a tab > Duplicate Tab. The copy opens immediately after the original with the same query and results.
Per-Tab Change Tracking
Each tab maintains its own pending changes. You can have edits in multiple tabs simultaneously without interference. Switching tabs saves and restores each tab’s change state.
Tab Persistence
Last Query Memory
TablePro remembers the last query text for each connection. Even if you close all tabs, the last query restores when you create a new tab.
What Is Persisted
| Saved | Not Saved |
|---|
| Tab ID and title | Query results (re-queried on reopen) |
| SQL content | Pending data changes |
| Tab type and table name | Selected rows, sort/filter state |
| Pin state | Preview tabs (discarded) |
Tab state auto-saves 500ms after any change. On reconnect, TablePro restores your tabs and re-executes table queries.
Table Tabs (Server-Side)
Table tabs use SQL LIMIT and OFFSET. Only the current page loads from the database. Page navigation triggers a new query. Configure page size in Settings > Data Grid.
Server-side pagination is memory efficient. Only the visible page is kept in memory, even for tables with millions of rows.
Query Tabs (Client-Side)
Query tabs execute the full query and receive all results. For large result sets, TablePro paginates client-side without re-querying. Sorting is done locally on cached results.
Configure page size in Settings > Data Grid: Small (100), Medium (500), Large (1,000), or Custom (10-100,000).
Right-click any tab:
| Action | Description |
|---|
| Duplicate Tab | Create a copy of this tab |
| Pin Tab / Unpin Tab | Toggle pin state |
| Close Tab | Close this tab |
| Close Other Tabs | Close all except this one (respects pins) |