马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
- -- 数据库表占用空间大小
- select
- table_schema as '数据库',
- sum(table_rows) as '记录数',
- sum(truncate(data_length/1024/1024, 2)) as '数据容量(MB)',
- sum(truncate(index_length/1024/1024, 2)) as '索引容量(MB)'
- from information_schema.tables
- where table_schema='db_name';
- -- 清空表(无日志)
- truncate table tablename;
复制代码 免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |