|
|
发表于 2025-8-20 09:56:47
|
显示全部楼层
|
本帖最后由 追影 于 2025-8-20 10:02 编辑
mysql长期运行 很多无用或过期的数据 如何快速找到需要清理的表?
- select
- table_schema as '数据库',
- table_name as '表名',
- table_rows as '记录数',
- round((data_length index_length) / 1024 / 1024, 2) as '表大小(mb)'
- from
- information_schema.tables
- where
- table_schema = '您的数据库名'
- order by
- table_rows desc;
复制代码
|
|