how to compact database table files after deleting a lot

  • Follow


I've just deleted 90% of the records of a table but the .MYD and .MYI
files representing the data are still the same size as before.  Is
there a way to compact them down?

Unfortunately I don't know how to get information about the tables
such as if they are MyISAM or whatever.  The mysqld server version is
3.23.58.

-Bennett

0
Reply bennett (89) 11/10/2007 6:34:54 AM

Bennett Haselton wrote:
> I've just deleted 90% of the records of a table but the .MYD and .MYI
> files representing the data are still the same size as before.  Is
> there a way to compact them down?

The command is: OPTIMIZE TABLE <table name>

> 
> Unfortunately I don't know how to get information about the tables
> such as if they are MyISAM or whatever.  The mysqld server version is
> 3.23.58.

The command for getting the definition of a table is: SHOW CREATE TABLE
<table name>

Good luck,
-- 
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
0
Reply Willem 11/12/2007 8:03:54 AM


On Nov 12, 12:03 am, Willem Bogaerts
<w.bogae...@kratz.maardanzonderditstuk.nl> wrote:
> Bennett Haselton wrote:
> > I've just deleted 90% of the records of a table but the .MYD and .MYI
> > files representing the data are still the same size as before.  Is
> > there a way to compact them down?
>
> The command is: OPTIMIZE TABLE <table name>

That worked great, thanks!

>
> > Unfortunately I don't know how to get information about the tables
> > such as if they are MyISAM or whatever.  The mysqld server version is
> > 3.23.58.
>
> The command for getting the definition of a table is: SHOW CREATE TABLE
> <table name>

That worked too, thanks so much.

> Good luck,
> --
> Willem Bogaerts
>
> Application smith
> Kratz B.V.http://www.kratz.nl/


0
Reply Bennett 11/12/2007 2:45:04 PM

2 Replies
3836 Views

(page loaded in 0.069 seconds)

Similiar Articles:













7/21/2012 7:36:25 PM


Reply: