Updating 100,000 records in less than one minute
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
- Dozens more answers to tough SQL Server questions from Michael Hotek are available here.
- The Best Microsoft SQL Server Web Links: tips, tutorials, scripts, and more.
- Have a SQL Server tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical SQL Server questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, SQL Server, DB2, object-oriented and data warehousing gurus are waiting to answer your toughest questions.