Mysql查看表的数据量

it2026-09-27  11

1. 查看所有表信息

SELECT * FROM information_schema.TABLES WHERE TABLE_SCHEMA = '库名';

2. 查看各个表数据量

SELECT table_name, table_rows FROM information_schema.TABLES WHERE TABLE_SCHEMA = '库名' ORDER BY table_rows DESC;

 

转载请注明出处:BestEternity亲笔。

最新回复(0)