mysql 查看表数据条数
2019-12-18 本文已影响0人
不爱吃饭的小孩怎么办
使用count(*)去计算太慢了,因为schema已经记录了表大小,所以我们直接查询表信息就可以。
mysql> show databases;
mysql> use information_schema;
mysql> select table_name,table_rows from TABLES where table_schema='xxxxx_data' order by table_rows desc;
+---------------------+---------------------+
| table_name | table_rows |
+--------------------+----------------------+
........