1、
SELECT
table_name,
table_rows,
data_length + index_length,
CONCAT(
ROUND(
(data_length + index_length) / 1024 / 1024,
2
),
'MB'
) DATA
FROM
information_schema.tables
WHERE table_schema = 'test_schema'
ORDER BY DATA DESC;
SELECT
(SUM(DATA_LENGTH) + SUM(INDEX_LENGTH))/1024/1024
FROM
information_schema.tables
WHERE table_schema = 'test_schema';