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;
评论