大约条数
mysql> desc select count(*) from game_online_overload;
+----+-------------+----------------------+-------+---------------+------+---------+------+-----------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+----------------------+-------+---------------+------+---------+------+-----------+-------------+
| 1 | SIMPLE | game_online_overload | index | NULL | dsg | 774 | NULL | 247842032 | Using index |
+----+-------------+----------------------+-------+---------------+------+---------+------+-----------+-------------+
1 row in set (0.02 sec)
占用空间
mysql> select TABLE_NAME,sum(DATA_LENGTH)+sum(INDEX_LENGTH) as size from information_schema.TABLES where TABLE_SCHEMA='hlogdb' group by TABLE_NAME order by size desc;
+-------------------------+------------+
| TABLE_NAME | size |
+-------------------------+------------+
| game_online_mps | 2498658304 |
结果:
mysql> truncate table game_online_overload;
Query OK, 0 rows affected (11.51 sec)