Here I am pressing up and running the same command on my dev DB on my laptop, over and over;
mysql> select count(*) from tblTraceOutput;
+----------+
| co
Assuming you are using InnoDB, as that is the default in 5.5.x according to the MySQL INFORMATION_SCHEMA TABLES documentation.
And this note:
The TABLE_ROWS column is NULL if the table is in the INFORMATION_SCHEMA database.
For InnoDB tables, the row count is only a rough estimate used in SQL optimization. (This is also true if the InnoDB table is partitioned.)
If you're using InnoDB as the storage engine, the number of rows is an estimate.
For InnoDB tables, the row count is only a rough estimate used in SQL optimization.
Source
It seems you are using an InnoDB table. They only hold a very rough estimate of row numbers in the status table meant to help the MySQL optimizer have basis for the query plan choices. For an exact row count you should keep a separate counter if needed frequently (as select count(*) is far from efficient).
It's not a bug. The value reported in the table_rows
column of information_schema.tables
is not guaranteed to be exact, nor do we expect it to be.