Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
denis_the_thief
Aged Yak Warrior
596 Posts |
Posted - 2011-01-26 : 17:05:46
|
| I have a loop that will run lets say 1,000,000 times. Inside the loop there is some calculation then an update and an insert. What would work fastest - the entire process in one transaction? To commit the transaction at every x loops? Or to commit the transaction at every iteration? Or shouldn't make any difference?Lets say no one else is using these tables during the processing. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-01-26 : 17:20:28
|
Is the loop required? No set based logic can be applied? Poor planning on your part does not constitute an emergency on my part. |
 |
|
|
|
|
|