Hi,
What I recommend.
- Add an
isProcessed
column to your table. - Make your script work on a chunk of, say, 1k rows for the first run (of course select only rows that are not processed).
- Benchmark it.
- Adjust the chunk size if needed.
- Build another script that calls this one at intervals.
Don't forget to add some sleep time in both your scripts!
This will work if your change does not need to be continuous (and I don't think it has to be). If you have to do it all at once you should put your database offline during the time the script runs.
Alin Purcaru
2010-10-19 07:52:54