Write, run and understand queries
Paid features on this page: Query Insights (Starter) and Result Charts (Starter). Everything else here is free.
An editor that knows your schema
Autocomplete reads the connection’s schema as you type: tables after FROM and JOIN, the columns of an alias, and the columns of a CTE or subquery defined earlier in the statement. Highlighting uses tree-sitter, and ⌘⇧L formats the statement at the cursor without dropping your comments.
⌘⏎ runs the statement at the cursor or the selection, ⌘⇧⏎ runs them all, ⌘⌥⏎ runs without the row cap, and ⌘. cancels. A batch of ordinary statements runs in one transaction and rolls back if one fails; the exceptions are scripts that manage their own transaction, SQL Server scripts, statements no transaction can hold such as VACUUM, and DDL on MySQL, MariaDB and Oracle, which commits on its own.
- Statement markers in the gutter, each with its own run button.
- Find and replace, with regular expressions.
- Vim mode with motions, registers and macros, where
:wruns the query. .sqlfiles open, edit and save as query tabs.


Parameters, history and saved queries
Write :customer_id in a query and TablePro asks for its value and type before running it, binding the value natively where the driver supports that.
Every query you run goes into a local history (⌘Y) with full-text search and filters for source, failures and time range. It keeps 10,000 entries for 90 days by default and is never synced.
Save a query with a keyword such as dau, then type the keyword in the editor to expand it. Saved queries keep a version history. A linked SQL folder syncs a folder of .sql files with the sidebar both ways, with Git status letters for each file; it is free, and separate from Linked Folders, the Starter feature for shared connection files.


Open Quickly and tabs
Open Quickly (⌘⇧O) finds tables, views and system tables across every open connection, along with your saved and recent queries. Each tab keeps its own SQL, sort, filters and column widths, and tabs come back after you quit and reopen the app; ⌃Tab moves between the tabs you used last.
Read the plan, compare it, track it
EXPLAIN and EXPLAIN Compare
⌥⌘E shows a query’s plan as a diagram, as a tree with cost bars, or as the engine’s raw output. Pick an earlier run of the same query as the baseline and Compare tells you whether it got slower and whether the plan changed; a difference under 15% counts as noise. Both are free.
- Plan as a diagram and tree
- PostgreSQL, MySQL, SQLite, MariaDB, CockroachDB, PGlite, ClickHouse, DuckDB, Cloudflare D1, Turso, libSQL, Google Cloud Spanner, Dameng DM8, SAP HANA
- Plan as text
- TiDB, OceanBase, Databend, Amazon Redshift, Snowflake, SurrealDB, Teradata, Trino, Cloudflare R2 SQL
- Dry-run cost estimate
- Google BigQuery
- SQL engines without EXPLAIN
- SQL Server, Oracle, Beancount


Query Insights
Query Insights: Starter plan
Query Insights reads this Mac’s query history and ranks what it finds: the queries run most, the slowest, the ones that fail, and the ones that got slower than in the period before. Queries are grouped by shape, so one statement run with different values counts once. The numbers are computed on your Mac and never uploaded.


Results as charts and maps
A result can switch from the grid to a chart or a map in the same tab, and back.
Result Charts
Result Charts: Starter plan
Draw a result as a bar, line, area or scatter chart, with a time axis for dates and one series for each value of a column you choose. A chart draws up to 2,000 points and 20 series from the first 50,000 rows, and its toolbar says when it stops short.


Map view
When a column holds geometry, as WKT, WKB, GeoJSON, ClickHouse tuples or Elasticsearch geo_point values, the Map view draws it on Apple Maps, and selecting a shape selects its row. Your rows stay on the Mac; Apple serves the map tiles. The Map view is free.


Engines that do not speak SQL
On a connection that does not use SQL, the editor takes that engine’s own language, and each engine’s page explains what it supports. The MongoDB editor is a mongosh-style JavaScript shell that runs inside TablePro, not mongosh itself.
- Query language by engine
- MongoDB (MQL), Redis (Redis CLI), Cassandra (CQL), ScyllaDB (CQL), Amazon DynamoDB (PartiQL), Elasticsearch (Query DSL), etcd (etcdctl), Apache Kafka (KafkaQL), SurrealDB (SurrealQL), Typesense (Typesense API), Weaviate (GraphQL)
On iPhone and iPad
The iPhone and iPad app has a Query tab with SQL highlighting, Run and Stop (⌘↩ with a keyboard), and a history of the last 200 queries run on that device. You can copy or share a result as JSON, CSV or SQL INSERT statements.
It has no autocomplete, formatting, parameters, EXPLAIN or saved queries, and it holds at most 10,000 rows of a result, so add a LIMIT to see the slice you need.
Where it works
| Capability |
|---|
| SQL editor with autocomplete and formattingMac: FreeiPhone and iPad: Highlighting, Run and Stop; no autocomplete |
| Query parametersMac: FreeiPhone and iPad: Not available |
| Query historyMac: FreeiPhone and iPad: The last 200 queries on the device |
| Saved queries and linked SQL foldersMac: FreeiPhone and iPad: Not available |
| Open QuicklyMac: FreeiPhone and iPad: Not available |
| EXPLAIN and EXPLAIN CompareMac: FreeiPhone and iPad: Not available |
| Query InsightsMac: Starter planiPhone and iPad: Not available |
| Result ChartsMac: Starter planiPhone and iPad: Not available |
| Map viewMac: FreeiPhone and iPad: Not available |
| Copy or share resultsMac: FreeiPhone and iPad: Free |
Limits worth knowing
- A query returns at most 10,000 rows unless you raise the cap in Settings, up to 500,000, or run it with ⌘⌥⏎. A LIMIT you write yourself always wins.
- Query history and Query Insights cover this Mac only: queries run on another Mac or on iPhone are not in them.
- The
tableproshell command opens connections and files in the app. It does not run queries from the terminal.
Get TablePro
macOS 13 Ventura or laterApple silicon or Intel