Hola,
Bueno, he descubierto la manera de hacerlo mecánicamente sin tener que ir 1 a 1:
Código:
$sql= mysql_query("SHOW TABLES FROM `-tubasededatos-`");
$tables = mysql_list_tables("-tubasededatos-");
while (list($table) = mysql_fetch_row($tables)) {
echo "$table <br />";
$sql = mysql_query("ALTER TABLE `$table` ADD INDEX `nombreindice` ( `columna` ) ");
}
Saludos, gracias.