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
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
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?