Whatever
 28.04.2014 11:04

Статьи Optimize all tables in MySQL database

< ?php
$alltables = mysql_query("SHOW TABLES");
while ($table = mysql_fetch_assoc($alltables))
{
   foreach ($table as $db => $tablename)
   {
       mysql_query("OPTIMIZE TABLE '".$tablename."'")
           or die(mysql_error());
   }
}
?>

Source: Snipplr

Leave a Reply

*