将 information_schema.TABLES.table_rows 列与从“SELECT count(*) from”检索到的物理行计数进行比较时,数字不匹配。为什么行数不同?
mysql> select TABLE_ROWS from TABLES where TABLE_NAME = 'gbl_session' and TABLE_SCHEMA = 'mydb';
+------------+
| TABLE_ROWS |
+------------+
| 7306 |
+------------+
1 row in set (0.01 sec)
mysql> select count(*) from mydb.gbl_session;
+----------+
| count(*) |
+----------+
| 7800 |
+----------+
1 row in set (0.01 sec)
Run Code Online (Sandbox Code Playgroud)