  | | | Saving space disk (innodb) | Saving space disk (innodb) 2007-10-10 - By mos
Back At 02:40 PM 10/10/2007, Baron Schwartz wrote: >mos wrote: >>At 01:24 PM 10/10/2007, Baron Schwartz wrote: >>>Hi, >>> >>>Tiago Cruz wrote: >>>>Hello guys, >>>>I have one monster database running on MySQL 4.0.17, using InnoDB: >>>>270GB Oct 10 14:35 ibdata1 >>>> >>>>I've deleted a lot of register of then, and I've expected that the size >>>>can be decreased if 50% (135 GB) but the ibdata was the same value than >>>>before "clean"... >>>>How can I force to save this space? >>> >>>You must dump your data to files, >>Why not change the table type to MyISAM instead of dumping to a file? > >If you have a bunch of indexes on the table, you're creating the indexes >on the MyISAM table too. It could be a lot more expensive than a dump and >restore. > >Otherwise it sounds like a good idea.
Baron, Ok, then how about this:
create table table2 select * from table1 limit 0; alter table table2 engine=myisam; insert into table2 select * from table1;
Now you can count the rows in Table2 to make sure it agrees with Table1. You can also browse the data to make sure the column data is correct. I'm always a bit leary of dumping and reloading from a csv file because it could miss data and you wouldn't know which rows are missing.
Mike
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=mysql@(protected)
|
|
 |