我是用这个方法统计的,这个SQL是不是在TiDB中不适用呢
SELECT
table_name AS ‘表名’,
table_comment AS ‘表说明’,
table_rows AS ‘记录数’,
TRUNCATE ( data_length / 1024 / 1024, 2 ) AS ‘数据容量(MB)’,
TRUNCATE ( index_length / 1024 / 1024, 2 ) AS ‘索引容量(MB)’
FROM
information_schema.TABLES
WHERE
table_schema = ‘xxx’
ORDER BY
data_length DESC,
index_length DESC;