找回密码
 立即注册

QQ登录

只需一步,快速开始

🌓

MYSQL查询最大的表

来源: 站务 admin 2024-6-9 12:23:18 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
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;






上一篇:中瑞商业评论 建议版块

中瑞商业评论 - 记录 建设 深耕
回复

使用道具 举报

大神点评1

admin 2024-6-9 12:36:40 显示全部楼层
delete  from zr_home_comment where  message like '%href%';
中瑞商业评论 - 记录 建设 深耕
回复 支持 反对

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【中瑞商业评论】
您需要登录后才可以回帖 登录 | 立即注册
关闭

站长推荐 上一条 /1 下一条

Title - Artist
0:00
    QQ:329363316
    关注公众号