interconnectit/Search-Replace-DB — pull request #23 by cyberhobo (2013-05-27 23:51:06+00:00)
Title: Free memory for each page query when done with it.

I don't claim a deep understanding of the script, but this addition fixed a "mysql client ran out of memory" error for me while running on a large wp_posts table.