From: Gary Wright Date: 2007-02-09T04:46:17+09:00 Subject: Re: General Approach to Data Validation On Feb 8, 2007, at 11:51 AM, Drew Olson wrote: > Pit Capitain wrote: >> The other way would be to read the records one after the other (using >> cursors in db terminology) in an appropriate sort order. If >> ActiveRecord >> allows you to do this in parallel with both tables, you could compare >> the tables like this: > > This is the exact approach I originally wanted to take. I would be > very > interested to know if ActiveRecord supports this type of operation. I > have yet to see a way to do it from what I've read of the > documentation. A while back (last year?) I asked why ActiveRecord didn't support 'lazy' iteration over query results. AR slurps up the entire result set into memory and then wraps objects (i.e. instances of ActiveRecord::Base or subclasses) around each row. This approach obviously has problems if you have large data sets. Perhaps this has changed since I last posed the question? Gary Wright