Note that with MySQL, unlike some other databases, you don't have to do 
this. If you are going to add new records to replace the deleted ones, 
MySQL will re-use the space freed by deletions with no special actions on 
your part. Of course, if you are not going to replace the deleted records, 
the commands suggested by David will certainly free space and probably 
improve performance.

        Alec Cawley

"Logan, David (SST - Adelaide)" <[EMAIL PROTECTED]> wrote on 08/03/2005 
22:58:12:

> Hi Chris,
> 
> For MyISAM/BDB tables use OPTIMIZE TABLE <your table name>;
> For InnoDB tables try ALTER TABLE <your table name> TYPE=InnoDB;
> 
 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, 9 March 2005 9:19 AM
> To: mysql@lists.mysql.com
> Subject: Compressing after Deletion
> 
> I have looked in the documentation and either I am not looking for the
> right thing or have simply overlooked it. But my question is this, I
> have
> a database with 35 Million records, and I need to delete about 25
> million
> of those. After deletion I would think that I would need to compress,
> shrink, or otherwise optimize the database. How is that done? do I need
> to
> do it? What commands should I be looking up in the docs?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to