-- Check Database SPACE
select concat(round(sum(DATA_LENGTH/1024/1024), 2), ' MB') as data from TABLES where table_schema='VWS2';
-- Check Index SPACE
SELECT CONCAT(ROUND(SUM(index_length)/(1024*1024), 2), ' MB') AS 'Total Index Size' FROM information_schema.TABLES WHERE table_schema LIKE 'VWS2';sh
select concat(round(sum(DATA_LENGTH/1024/1024), 2), ' MB') as data from TABLES where table_schema='VWS2';
-- Check Index SPACE
SELECT CONCAT(ROUND(SUM(index_length)/(1024*1024), 2), ' MB') AS 'Total Index Size' FROM information_schema.TABLES WHERE table_schema LIKE 'VWS2';sh
本文提供两个SQL脚本:一是用于检查特定数据库(VWS2)的数据占用空间大小(单位为MB),二是用于检查该数据库中所有索引的总大小。
813

被折叠的 条评论
为什么被折叠?



