Bug #633 SHOW TABLE STATUS tells sometimes wrong row count
Submitted: 11 Jun 2003 4:20 Modified: 11 Jun 2003 6:17
Reporter: Nils Hoyer Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:4.0.13-max OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[11 Jun 2003 4:20] Nils Hoyer
Description:
The number of records given from "SHOW TABLE STATUS TableName" (in the "Rows" field) is not eaqual to the number of records given from "SELECT COUNT(*) FROM TableName".

How to repeat:
InnoDB table:

SHOW TABLE STATUS TableName
take a look to the result field "Rows"

SELECT COUNT(*) FROM
take a look to the first result field

ATTENTION:
This problem is NOT everytime present!

In my database two of 6 tables reports the wrong number - the other four table are reported correctly.
[11 Jun 2003 6:17] Heikki Tuuri
Hi!

InnoDB does not keep accurate row counts. They are only estimates based on 10 random dives into the clustered index tree.

http://www.innodb.com/ibman.html#InnoDB_restrictions

Regards,

Heikki
[4 Jul 2005 7:25] [ name withheld ]
InnoDB does not seem to exhibit this behavior on Linux.  On Windows, it routinely gives me row count errors over 20 percent. I find it hard to believe that just because this behavior is alluded to in the manual makes it acceptable and "Not a Bug."