发新话题
打印

MySQL查看每个表占用的空间大小(体积)

MySQL查看每个表占用的空间大小(体积)

查询ktsee库中每个表占用的控件大小:
代码:
SELECT TABLE_NAME,DATA_LENGTH+INDEX_LENGTH,TABLE_ROWS,concat(round((DATA_LENGTH+INDEX_LENGTH)/1024/1024,2), 'MB') as data 
FROM information_schema.`TABLES`
WHERE TABLE_SCHEMA='ktsee'
ORDER BY (DATA_LENGTH+INDEX_LENGTH) DESC;

TOP

发新话题