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

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

This guide includes

Use this when planning capacity. This matters because information_schema reports sizes from statistics rather than from the disk - TABLE_ROWS is an estimate, and the two views answer different halves of the question.

Before you start

  1. Measure the schema, freshly analysed

  2. Compare the schema against the disk it lives on

Official sources