SELECT标签:1024,INDEX,张表,LENGTH,数据量,mysql,table,DATA,schema From: https://www.cnblogs.com/liuzhenguo/p/17400962.html
table_schema,
table_name AS 'name',
table_rows AS 'rows',
concat( round( DATA_LENGTH / 1024 / 1024, 2 ), 'MB' ) AS ALL_DATA,
concat( round( INDEX_LENGTH / 1024 / 1024, 2 ), 'MB' ) AS ALL_INDEX,
concat( round( ( DATA_LENGTH + INDEX_LENGTH )/ 1024 / 1024, 2 ), 'MB' ) AS TOTAL
FROM
information_schema.TABLES
WHERE
table_schema = '当前schema名称'
and TABLE_NAME = '表名';