Query History
Every query you execute is automatically saved to a local SQLite database. Search with full-text search, filter by connection or time range, and re-run past queries. History persists across sessions.

Cmd+Y, or click the History icon in the toolbar. Recent queries also appear in the sidebar.
The history panel shows your executed queries with execution time, status, and database. Sort by time (most recent first), duration, or query text. Filter by connection, status (success/error), or time range (today, week, month, all time).


Searching History
Full-Text Search
Type in the search box to find queries containing specific text:

Using History
Re-running Queries
To re-run a query from history:- Find the query in the history list
- Double-click the query
- It loads into the SQL editor
- Press
Cmd+Enterto execute
Copying Queries
To copy a query:- Select the query in the list
- Right-click > Copy Query
- Or press
Cmd+C


Editing Before Running
To modify a historical query:- Double-click to load into editor
- Make your changes
- Execute the modified query
Query Details
Viewing Full Query
For long queries, click to expand and see the full text:



Storage
Query history is stored in~/Library/Application Support/TablePro/query_history.db (a local SQLite database with FTS5 full-text search).
Configure retention in Settings > History:
| Setting | Default | Description |
|---|---|---|
| Max Entries | 10,000 | Maximum queries to store |
| Max Days | 90 | Delete queries older than this |
| Auto Cleanup | On | Automatically remove old entries |
