in reply to Fetch Mysql huge database

Ummm...

SELECT BIG.primary_key FROM big_table BIG
LEFT OUTER JOIN other_table OTH ON (BIG.primary_key = OTH.primary_key)
WHERE OTH.primary_key IS NULL;


Now you have the primary-keys of all the rows in BIG that do not have a corresponding row in OTH. You didn't write a single line of Perl code. Not a single row (except the solution) ever left the confines of the SQL server. The database did all the work. If you need to test other combinations of columns, build an index on those column-sets in both tables first.