in reply to Out of memory!
Why go to the trouble of reading the tables in perl? It sounds like a problem the database is suited to. For example:
--Get list of URLs in table 1 not present in table 2 select * from table_1 where URL not in (select URL from table_2) --Get list of URLs in both tables select T1.URL from table_1 T1 join table_2 T2 on T1.URL = T2.URL --Same, but where "description" doesn't match select T1.URL from table_1 T1 join table_2 T2 on T1.URL = T2.URL where T1.Description != T2.Description
Moving a ton of data from the database server to perl to do simple comparisons is generally the wrong way to go. Learn SQL enough to do your work in the database when possible.
Of course, there are times when it's appropriate to use perl to whack entire tables. But in that case, you probably want to use a bulk copy utility (BCP on Sybase and MS SQL Server) to dump the tables to a flat file. It's faster and you won't run out of memory.
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Out of memory!
by JavaFan (Canon) on Aug 12, 2010 at 11:31 UTC | |
by roboticus (Chancellor) on Aug 12, 2010 at 12:07 UTC | |
|
Re^2: Out of memory!
by santhosh.yamsani (Initiate) on Aug 12, 2010 at 05:45 UTC | |
by roboticus (Chancellor) on Aug 12, 2010 at 11:12 UTC |