Skip to main content
Each Table Health tab checks one database, in every schema, and stays on it. Choose Database > Table Health and the tab opens on the database the window is on. The item is dimmed until a database is selected, and on engines other than PostgreSQL, MySQL and MariaDB. Choose it again for the same database and that tab comes forward, in whichever window holds it. Moving the sidebar to another database later leaves the tab where it was: choose the item again to open a tab for the other one. The checks read catalogs and statistics and change nothing. Press Cmd+R (Database > Refresh) or click the refresh button in the tab’s bar to run them again.
Table Health tab with the checks list, a findings table and the SQL preview for the selected findingTable Health tab with the checks list, a findings table and the SQL preview for the selected finding

One tab per database: the checks on the left, their findings on the right, the selected finding's fix under them

Read the report

The list on the left starts with All Findings. Under Checks comes one row per check the engine runs, with its finding count when it found something, Skipped when the server keeps nothing the check could read, or Failed when its query failed. Resolved, under History, holds the findings that went away; see Track findings. Select a check to read what it looks for, with its threshold, over the table. Notes there also say when the usage counters started, that the server is a standby, or what to know about one check’s numbers. The table shows Status, Check, Table, Object, Size and Detail. Click a header to sort by it. Size is the size on disk of the index for an index check and of the table otherwise, empty where the check has none. On PostgreSQL it is the catalog’s estimate as of the last VACUUM, ANALYZE or index build, so no check waits on a lock another session holds. Shift-click or Cmd-click to select several findings: every action in Act on findings works on a selection. Type in Filter to keep the rows whose check, table, object or detail contains the text. Ignored findings stay out of the table and the counts until you select Show Ignored.

What each engine checks

The thresholds are fixed. No setting changes them.

Standby servers

On a PostgreSQL standby, Bloated Tables, Unused Indexes and Stale Statistics are skipped: a standby’s activity counters record its own queries, not the primary’s. The other checks run, and a note over the table says to run the fixes on the primary.

Objects an extension owns

The PostgreSQL checks leave out every object an extension owns, and everything in a schema an extension owns, such as TimescaleDB’s chunk tables. Other sessions’ temporary tables are left out too.

Read the statistics window

An index looks unused when nothing scanned it since the counters started. The note over the table says when that was:
  • PostgreSQL: when the database’s statistics were last reset, or that they never were.
  • MySQL and MariaDB: when the server started, since performance_schema counts from there. An index on a table with no recorded reads or writes since then is not listed.
When the server records nothing to read, the check is skipped and says why:
  • PostgreSQL: track_counts is off. Bloated Tables and Stale Statistics are skipped with it.
  • MySQL and MariaDB: performance_schema is off, the wait/io/table/sql/handler instrument or the global_instrumentation consumer is disabled, or no table in the database has a recorded read or write since the server started. MariaDB ships with performance_schema off; set performance_schema=ON and restart to turn it on.
On MySQL 8.0 and later, AUTO_INCREMENT Near Its Limit and Reclaimable Space read values the server caches for information_schema_stats_expiry seconds, one day by default. ANALYZE TABLE refreshes a table’s values. Check an index against a period of normal traffic before dropping it. One a monthly report reads looks unused for the other 29 days.

Act on findings

Select a finding and the pane under the table shows its detail, its measured values, such as dead rows or the share of a range used, and the SQL that fixes it. Select several and the pane shows one script with every fix, each under a comment naming its finding. A finding with no fix, such as a counter already on the widest integer type, says so instead. Nothing runs from this tab. To act on what it shows:
  • Open Table, in the pane or the context menu, or a double-click, opens the finding’s table. It applies when the selected findings name one table.
  • Open in Editor in the pane, or Open Fix in Editor and Open Fixes in Editor in the context menu, puts the fixes in a new query tab on the checked database, without running them.
  • Copy in the pane, or Copy Fix SQL in the context menu, puts the fixes on the clipboard.
  • Save Fix Script… writes the fixes to a .sql file. In the tab’s bar it takes every finding the table shows; in the context menu, the selected ones.
A script opens with comments naming the database, when the checks ran, and that each statement runs on its own. A statement two findings share, such as the drop of an index both unused and redundant, appears once, under both findings’ comments. VACUUM, CREATE INDEX CONCURRENTLY, DROP INDEX CONCURRENTLY and REINDEX INDEX CONCURRENTLY cannot run inside a transaction, so run them with auto-commit on.

The fixes

Track findings

New

After a check has run once, a finding it reports for the first time reads New in Status until the next refresh. A check’s first run marks nothing new.

Ignore a finding

Right-click the findings you accept as they are and choose Ignore. They leave the table and the counts. Select Show Ignored to see them marked Ignored, and choose Stop Ignoring to bring them back. An ignore holds across refreshes, and through the finding going away and coming back, so an index dropped and created again under the same name stays ignored.

Resolved

When a check completes without a finding it reported before, that finding moves to Resolved under History, with when it was last seen. It stays there until it comes back, as New, or until you right-click Resolved or a row in it and choose Clear Resolved. A check that is skipped or fails moves nothing. The list keeps the 1,000 most recently resolved. A finding is known by its check, schema, table and object, so a renamed index reads as one finding resolved and a new one. Renaming a table, schema or database from TablePro carries its history over, and dropping one removes it. The history is kept on this Mac, per connection and database. It is not part of iCloud sync, and removing the connection removes it. MCP clients read the same statuses through get_table_health.

Export and copy

Choose File > Export > Export Results… (Cmd+Option+Shift+E), Export Results… under Actions in the toolbar, or Export… in the tab’s bar. The export dialog offers the formats a data file exports to, and asks which rows to write:
  • All Findings: every current finding, ignored ones included.
  • Shown Findings: what the table shows, after the check, Filter and Show Ignored, or the Resolved list. Offered, and selected first, when the table shows fewer than all findings.
  • Selected Findings: the selected rows the table shows. Offered when rows are selected.
The rows are taken when the dialog opens, so a refresh behind it leaves the file as it was. The columns are database, check, schema, table, object, status (new, ignored, resolved or empty), size_bytes, detail, first_seen, last_seen and fix_sql, then one column per measured value the rows carry, such as dead_rows or used_percent. Times are UTC, written yyyy-MM-dd HH:mm:ss, and a percentage is a fraction: 0.25 is 25%. Press Cmd+C, or right-click and choose Copy, to copy the selected rows as tab-separated text with a header row, in the table’s columns. A tab or line break inside a value becomes a space.

When a check is skipped or fails

Select a check marked Skipped to read why. The reasons are the version and privilege needs in What each engine checks, a standby server, and the counters in Read the statistics window. Select a check marked Failed to read the server’s error. The other checks still run, and the next refresh tries it again. A check that fails on a later refresh keeps the findings it had, shown under the error. On PostgreSQL, a sequence the account has neither SELECT nor USAGE on is not checked, and a note on Sequences Near Their Limit counts them.