[MDEV-16504] information_schema.tables is differnt row count Created: 2018-06-18  Updated: 2019-03-04  Resolved: 2019-03-04

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Na Yun Ho Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

MariaDB-10.2.15

Table row count is different!

MariaDB [sbtest]> select count(*) from sbtest.sbtest1;
+----------+
| count(*) |
+----------+
|  1000000 |
+----------+
1 row in set (0.24 sec)
 
MariaDB [sbtest]> SELECT table_name, table_rows FROM information_schema.tables WHERE table_schema = 'sbtest' ORDER BY table_name;
+------------+------------+
| table_name | table_rows |
+------------+------------+
| sbtest1    |     986400 |
+------------+------------+
1 row in set (0.00 sec)



 Comments   
Comment by Sergei Golubchik [ 2019-03-04 ]

the second value is an estimate, it's not precise. But it can be computed much faster than the exact count(*).

Generated at Thu Feb 08 08:29:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.