1
我在DB中有一张桌子,空间大约为90 GB。我试图计算没有行的表中的 select count(idNewsNotification) from notification
并导致将显示表状态显示表中的精确行?
4982397
1 row in set (59 min 48.35 sec)
但是,当我询问使用show table status like <table_name>
它表明
Engine: InnoDB
Version: 10
Row_format: Compact
Rows: 8631267
Avg_row_length: 11237
Data_length: 96996425728
Max_data_length: 0
Index_length: 175374336
Data_free: 0
Auto_increment: NULL
.....
有什么完美知道表中没有记录的程序?
可能重复[最快的方式来获取innodb表的行数,在MySQL 4.0?](http://stackoverflow.com/questions/1191414/whats-the-quickest-way-to-get -ROW-计数的-innodb的桌式MySQL的-4-0) – Barmar