Problem solve Get help with specific problems with your technologies, process and projects.

Updating 100,000 records in less than one minute

I need to update a 100,000 record table with five fields in it. Using UPDATE it takes about 10 minutes. Using rs.movenext also takes about 10 minutes. Is there a faster way to do this? Can I tell SQL Server not to update any other tables while it is doing this? I would like to be able to update it in about one minute. Is this possible?

Completely possible. Instead of trying to update all 100,000 rows in a single step, do the update in 100 iterations of 1,000 rows. Why? You acquire fewer locks and take up significantly less memory resources which allows SQL Server to move through the update much more rapidly than trying to take a single massive step through the data.


For More Information

Dig Deeper on Microsoft SQL Server Installation