MySQL查看表占用空间大小

 

 

-- 1,切换数据库
use `information_schema`;


-- 2,查看数据库使用大小
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='web-source' ;

-- 3,查看表使用大小
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='web-source' and table_name='user';

 

 

参考:

https://blog.csdn.net/u014044812/article/details/70227364

https://blog.csdn.net/Field_Yang/article/details/81209503

 

posted @ 2021-04-12 08:54  poterliu  阅读(486)  评论(0编辑  收藏  举报