标题: MYSQL查询最大的表 [打印本页] 作者: admin 时间: 2024-6-9 12:23 标题: MYSQL查询最大的表 SELECT
table_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;作者: admin 时间: 2024-6-9 12:36
delete from zr_home_comment where message like '%href%';