CertGrid CertGrid
Hands-on Lab·MySQL

MySQL Table Sizes and Growth

`information_schema` reports table sizes, and `TABLE_ROWS` is an estimate that was wrong every time it was read here. Useful for capacity, useless for counting.

Monitoring and Operations Guide 42 of 45 Beginner

Written against the versions above. InnoDB samples index pages to estimate row counts. The sample size is controlled by `innodb_stats_persistent_sample_pages`, and no setting makes the estimate exact.

Every command on this page ran on db-a01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB

Before you start

  1. Measure the schema, freshly analysed

  2. Compare the schema against the disk it lives on

Official sources