mysql查询某张表数据量
SELECT
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 = '表名';