SELECT table_schema, table_name, engine, data_length, index_length,
round(((data_length + index_length) / 1024 / 1024),2) AS total_mb,
round((data_free/1024/1024),2) AS free_mb
FROM information_schema.tables
where table_schema != "information_schema"
group by table_schema, table_name
order by free_mb desc
查询表空间、碎片空间大小
于 2024-02-20 16:50:15 首次发布