Bug #5755 Innacurate Row Count on InnoDB Table
Submitted: 27 Sep 2004 0:13 Modified: 27 Sep 2004 16:03
Reporter: Craig Reilly Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Administrator Severity:S3 (Non-critical)
Version:1.0.12 OS:Windows (MS Windows XP)
Assigned to: CPU Architecture:Any

[27 Sep 2004 0:13] Craig Reilly
Description:
Using MySQL 5.0.1 Alpha
When executing: 'SELECT COUNT(*) from mtb.users' it returns: 103060
When in MySQL Administrator, Catalog, Schema Tables, Hitting the Refresh button shows 6+ different results on the same table.  Each time it reports a different number of rows.

How to repeat:
My Schema: MTB
My table: user, InnoDB
Reported Data Length: 25.6 MB
columns: id, Integer, Not Null, Auto Inc, Unsigned
The remaining 12 columns are Varchar(100), not null
True # of rows: 103060
[27 Sep 2004 0:30] Craig Reilly
When I convert the table to MyISAM - MySQL Administrator accurately reflects the row count.
[27 Sep 2004 16:03] Heikki Tuuri
Hi!

SHOW TABLE STATUS for an InnoDB table returns an estimate of the row count. The estimate is calculated by 8 random dives into the clustered index of the table.

Regards,

Heikki