SELECT table_name ‘表名称‘,table_rows ‘数据量(万)‘,data_size ‘磁盘(G)‘
FROM (
SELECT
table_name table_name,
truncate(table_rows / 10000, 2) table_rows,
truncate(data_length / 1024 / 1024 /1024, 2) data_size
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = ‘db_nono‘
AND (table_name LIKE ‘invt%‘ OR table_name IN
(‘lazy_add‘, ‘表名‘))
ORDER BY table_rows DESC)T WHERE data_size > 0;