j**n 发帖数: 54 | 1 我们要保留大概30天的数据, 然后不要的就用DELETE去掉, 现在发现数据库的SIZE还
是在不停变大。 什么原因有大虾知道吗?
多谢多谢。 | j**n 发帖数: 54 | 2 是不是DELETE掉的ROW只是LOGICALLY MARK,而没有真正DELETE掉。 有知道解决办法的
吗?鞠躬了。 | I******e 发帖数: 101 | 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? | j**n 发帖数: 54 | 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?
| I******e 发帖数: 101 | 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? |
|