in reply to Of large database tables and high memory usage.
The only time I've encountered this kind of problem was when I had to merge two databases. My options were...
1. Read the entire contents of table A (smaller table).
* Iterate over table A's result set and do individual selects from table B
* Update row in table A
or
2. Read Limited and Offset slices of table B
* Update row in table A
Since I was able to lock access to both databases, option 2 turned out to be the fastest. If other users were able to add or update rows while I was doing this, it may have broken the script since my Limits and Offsets could've gotten screwed up.