MYSQL查询最大的表
SELECTtable_name AS '表名',
table_rows AS '记录数',
TRUNCATE (data_length / 1024 / 1024, 2 ) AS '数据容量(MB)',
TRUNCATE (index_length / 1024 / 1024, 2 ) AS '索引容量(MB)',
TRUNCATE ((data_length + index_length ) / 1024 / 1024, 2 ) AS '总大小(MB)'
FROM information_schema.TABLES a
ORDER BY ( data_length + index_length ) DESC
LIMIT 10;
或
SELECT
table_schema AS 'Database',
table_name AS 'Table',
round(((data_length + index_length) / 1024 / 1024), 2) AS 'Size in MB'
FROM information_schema.TABLES
ORDER BY (data_length + index_length) DESC
LIMIT 10; deletefrom zr_home_comment wheremessage like '%href%';
页:
[1]