Rails Migration Memory Therapy
codeclimber.blogspot.com
codeclimber.blogspot.com
Realize you've fucked up? A quick ROLLBACK TRANSACTION and you are safely back where you started. This is so freaking simple, I can't believe people aren't using it.
Also, in Rails 2.3 you can do .find_each, which will iterate over each record in 1000-chunk batches.