Re: Reusing deleted variable-size record space
Hello Renito -
What you are looking for is MySQL's OPTIMIZE function:
http://dev.mysql.com/doc/refman/5.0/en/optimize-table.html
It does exactly what you are looking for.
You can implement this manually, via shell script on a timer, etc. I have
written a multi-threaded perl solution which will check, repair and optimize
tables simultaneously to save time:
http://dbuettner.dyndns.org/blog/?page_id=88 HTH,
Dan
On 9/30/07, Renito 73 <renito73@gmail.com> wrote:
> > Hello > > I have a database with variable-size fields, some of them may be > modified/deleted during the usage and administration, so my doubt is: how > can > I compact the records to remove those blank spaces and save space, lets > say "defragment" the database file so data is continuous and contiguous? > > This task should be performed just once or twice a month, so no matter if > it > could take a while. > > Is there an internal function to do that? I could copy existing records to > a > new table, delete all the original ones and then insert them back and drop > the second table but don't like it too much. > > > Thanks for any suggestion > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=drbuettner@gmail.com > > Received on Sun Sep 30 12:21:07 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 07 2007 - 10:13:00 EDT
|