MySQL Table Size and Growth Monitoring Checklist
Database growth can come from posts, logs, sessions, transients, analytics, plugin tables, imports or automation records. Monitoring table size helps prevent slow backups, full disks and performance issues.
Core principle
Not all tables grow equally. Find the tables that grow fastest, then connect growth to the application feature or plugin that writes them.
Checklist
- Check total database size.
- List largest tables.
- Identify which application or plugin owns each large table.
- Check row count for critical tables.
- Check whether growth is expected.
- Check backup size and time.
- Check disk capacity trend.
- Plan cleanup only after backup.
- Monitor table size monthly or weekly.
- Document growth drivers.
Reusable lesson
This applies to WordPress postmeta, WooCommerce orders, plugin logs, analytics tables, n8n executions, crawler data and custom app event logs.
When to Use This Checklist
Use this checklist when a database grows quickly, backups become slow, disk fills up or WordPress/admin performance declines.
Required Tools
MySQL access, database name, SSH access, backup, disk monitoring, application or plugin knowledge
Before You Start
Do not delete large tables before confirming ownership, backup status and application impact.
Structured Checklist Steps
- Check database size.
- List largest tables.
- Map table ownership.
- Check row counts.
- Classify growth.
- Check backup impact.
- Check disk trend.
- Plan safe cleanup.
- Set monitoring schedule.
- Document drivers.
Verification Steps
- Largest tables are known.
- Growth drivers are identified.
- Backup impact is understood.
- Cleanup plan has backup.
- Monitoring schedule exists.
Rollback Plan
If table cleanup breaks application behavior, restore the database backup and repeat cleanup on staging with a narrower target.
Common Mistakes
- Deleting plugin tables blindly.
- No backup before cleanup.
- Ignoring postmeta growth.
- Not checking backup duration.
- No regular table growth review.
Related Commands
mysql -u root -p -e "SELECT table_schema, ROUND(SUM(data_length+index_length)/1024/1024,2) AS size_mb FROM information_schema.tables GROUP BY table_schema ORDER BY size_mb DESC;"
mysql -u root -p -e "SELECT table_name, ROUND((data_length+index_length)/1024/1024,2) AS size_mb FROM information_schema.tables WHERE table_schema='database_name' ORDER BY size_mb DESC LIMIT 20;"
df -h