Redian新闻
>
MYSQL 的LOG SIZE怎么在不停 变大
avatar
MYSQL 的LOG SIZE怎么在不停 变大# Database - 数据库
j*n
1
我们要保留大概30天的数据, 然后不要的就用DELETE去掉, 现在发现数据库的SIZE还
是在不停变大。 什么原因有大虾知道吗?
多谢多谢。
avatar
j*n
2
是不是DELETE掉的ROW只是LOGICALLY MARK,而没有真正DELETE掉。 有知道解决办法的
吗?鞠躬了。
avatar
I*e
3
Almost that. Are you using InnoDB or MyISAM? A simple way is to use
mysqldump to dump everything a file and re-load the database. MySQL does
not have online re-organization ability.
BTW, do you have a lot of indexes?
avatar
j*n
4
thanks. I am using InnoDB right now, because of this, seems I need to change
to MyiSam.
The index file is the same as data file, for MyiSam, rebuild the index or
optimize the table both shrink the files a lot, but no effect on InnoDB
files.

【在 I******e 的大作中提到】
: Almost that. Are you using InnoDB or MyISAM? A simple way is to use
: mysqldump to dump everything a file and re-load the database. MySQL does
: not have online re-organization ability.
: BTW, do you have a lot of indexes?

avatar
I*e
5
In general, InnoDB is much better than MyISAM. If you can tolerate the
downtime, you can do the process periodically.
How large is your data now?
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。