Table Size: Know What Is Taking Up Your Disk
Disk does not fill up overnight. It fills up gradually, driven by a handful of tables that nobody is watching — logging tables, audit tables, event history tables that grow without bound until they become a problem.
Knowing the size of your tables by schema is basic DBA hygiene. The data-to-index ratio tells you whether your indexes have grown disproportionately. The reclaimable space tells you how much fragmentation has built up from deletes and updates — space InnoDB holds but the OS cannot see.
Loading…
Reading the Results
Per-Table View
| Column | What to Check |
|---|---|
table_rows | Estimated row count from information_schema — approximate, not exact |
data_mb | Size of actual row data |
index_mb | Space used by all indexes on this table |
total_mb | Combined footprint — what the table is costing on disk |
reclaimable_mb | Space held by InnoDB but not containing live data — freed by OPTIMIZE TABLE |
index_to_data_pct | Index size as a percentage of data size — over 100% is worth investigating |
Schema Rollup
Use the second query to quickly identify which schemas are growing fastest or consuming the most space. A schema with a small table count but large total_mb usually has a few problem tables worth drilling into.
What to Watch For
| Signal | What It Means |
|---|---|
reclaimable_mb >> data_mb | Heavy delete/update churn — OPTIMIZE TABLE will reclaim space |
index_to_data_pct > 100% | Indexes are larger than the data they cover — possibly too many or too wide |
Large table_rows with small total_mb | Very narrow rows — often fine, but watch for hidden large columns (TEXT/BLOB) |
| Unexpected large table in a schema | Logging or audit table growing without a retention policy |
Schema with rapidly growing total_mb | May need archival strategy or partitioning before it becomes a disk incident |
table_rowsininformation_schemais an estimate based on InnoDB statistics. For exact counts runSELECT COUNT(*) FROM table_name— but be careful on large tables.
Gareth Winterman