Think about Loose Coupling | |
PerlMonks |
Re: Fetch Mysql huge databaseby Anonymous Monk |
on Sep 29, 2011 at 11:49 UTC ( [id://928536]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|