From: Ruby Student Date: 2012-11-13T07:21:04+09:00 Subject: Efficient way for comparing records between 2 large files (16 million records) --e89a8fb1f6007e7bb604ce53b7d6 Content-Type: text/plain; charset=ISO-8859-1 Team, I have two large files, about 16 million records each. The files are sorted. The first 13 characters are used as a key. We get an updated file every week. We also keep the previous week file. I need to compare the keys from the new file to the keys on the file from last week. If the rest of the records are the same, then I do nothing. If the keys matches but the rest of the records are different, I then have an update and I will output that record to a new file. I was wondering if there is an efficient way to do this in Ruby. Either any built-in method or an efficient algorithm which I can implement. Thank you -- Ruby Student --e89a8fb1f6007e7bb604ce53b7d6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Team,

I have two large files, about 16 million records each.
The = files are sorted.
The first 13 characters are used as a key.
We get a= n updated file every week.
We also keep the previous week file.

I need to compare the keys from the new file to the keys on the file from l= ast week. If the rest of the records are the same, then I do nothing. If th= e keys matches but the rest of the records are different, I then have an up= date and I will output that record to a new file.
I was wondering if there is an efficient way to do this in Ruby. Either any= built-in method or an efficient algorithm which I can implement.

Th= ank you


--
Ruby Student
--e89a8fb1f6007e7bb604ce53b7d6--