MySQL has an OPTIMIZE TABLE command which can be used to reclaim unused space in a MySQL install. Is there a way (built-in command or common stored procedure) to run this o
Following example php script can help you to optimize all tables in your database
$tablename) { mysql_query("OPTIMIZE TABLE '".$tablename."'") or die(mysql_error()); } } ?>