i have little problem with one algo .
first i have two tables there are above one lac records in each table .
table 1X structure
id domain
1 google.com
2 daniweb.com
3 yahoo.com
table 2X structure
id domain
1 google.com
2 facebook.com
3 youtube.com
now my task is to compare table 2X with Table 1X and compare domains in it
if table 2X domain != table 1X domain then OK insert to Table 1X else ignore and delete Table2x domain becasue its present in table 1X.
am doing php coding for that
last night i write script for that in one way
way1 :: fetch both tables data in assoc array( mysql_fetch_assoc($t1)); and then comapre like
$a=$r1['domain'];
$b=$r2['domain'];
if($a != $b) { //OK else {// not ok}
but this is method is too expensive use too much server ram and cup ..... so not good
so please help me in that task any suitable method that cost me little ram and cpu on server ... thanks