深圳全飞鸿

标题: MySQL语句查看各个数据库占用空间 [打印本页]

作者: zhgc    时间: 2020-6-9 17:14
标题: MySQL语句查看各个数据库占用空间



select 'sfc' db, (sum(DATA_LENGTH)+sum(INDEX_LENGTH))/1024/1024/1024 'SIZE' from information_schema.tables
where table_schema='sfc'
union
select 'smt' db, (sum(DATA_LENGTH)+sum(INDEX_LENGTH))/1024/1024/1024 'SIZE' from information_schema.tables
where table_schema='smt';






欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2