List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:July 14 2004 4:21pm
Subject:Re: deleting millions of records did not change the file size
View as plain text  
In the last episode (Jul 14), Gil Vidals said:
> My question in brief is why wouldn't the physical mysql files change
> in size if a substantial percentage of the records are deleted from a
> given table???

Automatic filesize reduction would only be possible if the deleted
records were at the end of the file, and that's rare enough that it's
not implemented.  Try running "OPTIMIZE TABLE mytable", which will copy
all the records out of your table into a fresh new one, and will also
rebuild and analyze your indexes.

> I have a table which contained 13.5 million records. I then deleted
> 6.5 million records; however, the physical file size did not change.

-- 
	Dan Nelson
	dnelson@stripped
Thread
deleting millions of records did not change the file sizeGil Vidals14 Jul
  • Re: deleting millions of records did not change the file sizeDan Nelson14 Jul
  • Re: deleting millions of records did not change the file sizemos14 Jul
RE: deleting millions of records did not change the file sizeMarvin Wright14 Jul