Ciao a tutti,
devo aggiornare una tabella Mysql (su aruba), leggendo i dati da un file xml, ma impiega troppo tempo, oltre 1 ora, il numero di record sono circa 10.000!
sbaglio qualcosa? è normale? 
premetto che leggere e stampare a video solo il file xml, senza query, impiega 10 secondi,
posto il codice incriminato
Codice PHP:
foreach($xml->foto as $User)
{
$i_1 = $User->fotoid;
$i_2 = $User->UserId;
$i_3 = (date("y-m-d"));
$check_sql = @mysql_query("SELECT album, i_codice FROM immobili WHERE fotoid='$i_1' and i_codice='$i_2'");
$num_rows = @mysql_num_rows($check_sql);
if($num_rows == 1) {
mysql_query("UPDATE album SET i_data_m='$i_3' WHERE fotoid = '$i_1' and i_codice='$i_2'");
echo"aggiornato $i_1
";
} else {
echo"inserisco nuovo record
";
}