Skip to content

Database overhead (free space in tables)

Database overhead is space the database has reserved for its tables but isn’t using right now. When rows are deleted or shrink, the space they took doesn’t disappear; the database keeps it and fills it again with new data later.

Most of the time, it doesn’t. With InnoDB, the storage type most WordPress sites use today, free space inside a table is normal and gets reused. The number that tools show as “overhead” doesn’t measure wasted space for these tables, and optimizing them to bring it down rarely makes a lasting difference: the space fills up again as the site keeps working.

It mattered more with the older storage type MyISAM, where deleted rows left gaps that slowed some queries. Tables that still use it are worth noticing for that reason alone.

Server: The storage type of each table, and whether tables share one storage file or each has its own, decides what the number means. When tables share a file, the same free space can appear under several tables at once.

WordPress: Deleting many rows at once leaves free space behind: cleaning up revisions, transients or old logs, or emptying the trash.

Permo shows the overhead in System info, tab Database, under Tables, below the list of the largest tables. It counts only tables that don’t use InnoDB, because for InnoDB the number says little. When all tables use InnoDB, the line reads Overhead: 0 B. All tables use InnoDB, which doesn’t need optimizing. Otherwise, it names the free space in the other tables and how many of them there are.

The tables check runs only when you select Check tables; it reads the database’s own statistics, which can take a few seconds on shared hosting. Permo doesn’t rate the overhead and optimizes nothing.

Sources