Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MySQL++ - Programming with the C++ API to MySQL
MaxDB - Everything about MaxDB, formerly known as SAP DB
ODBC - ODBC with the MySQL Connector/ODBC driver
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
Update one field with more fields from another table
Getting Identity after INSERT
ERROR 2002: Can 't connect to local MySQL server through socket
mysql test 4 1 fails with the gis test
MySQL Cluster Software
Downgrade Mysql from 4 to 3 23
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Can 't access mysql after kernel upgrade
Executing MySQL Commands From Within C Program
Comparing and writing out BLOBS
Preventing Duplicate Entries
FULLTEXT query format question
Strange behavior, Table Level Permission
Does the binary log enabling affect the MySQL performances?
mysql:it 's a db not a dbms how it 's possible?!
mysql have same function mthod as Oracle decode()
 
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)