嗨,我不明白为什么我的 MYSQL 行为异常。
在这里我想知道表site_details中存在的记录数为了得到这个我已经执行
select count(*) from site_details;
了我得到的结果是
+----------+
| count(*) |
+----------+
| 2024 |
+----------+
然后再次验证我已经执行
mysql> SHOW TABLE STATUS FROM msp LIKE 'site_details'\G
了我得到的结果
*************************** 1. row ***************************
Name: site_details
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 1612
Avg_row_length: 71
Data_length: 114688
Max_data_length: 0
Index_length: 81920
Data_free: 7340032
Auto_increment: NULL
Create_time: 2012-10-01 08:05:09
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)
观察两个查询的行数之间的计数差异
然后在不修改我的表的情况下,我再次执行了相同的查询
mysql> SHOW TABLE STATUS FROM msp LIKE 'site_details'\G
,奇怪的是我得到了类似的结果
*************************** 1. row ***************************
Name: site_details
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 1934
Avg_row_length: 59
Data_length: 114688
Max_data_length: 0
Index_length: 81920
Data_free: 7340032
Auto_increment: NULL
Create_time: 2012-10-01 08:05:09
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options:
Comment:
1 row in set (0.00 sec)
观察上述查询的行列,我得到了类似 2024 1612 1934 的结果
为什么会这样??