Need to "tie" UPDATE
with ORDER BY
. I\'m trying to use cursors, but get the error:
cursor "cursupd"
This worked for me:
[update statement here] OPTION (MAXDOP 1) -- prevent row size from causing use of an eager spool, which mutilates the order in which records are updated.
I use a clustered int index in sequential order (generating one if needed) and hadn't had a problem until recently, and even then only on small rowsets that (counterintuitively) the query plan optimizer decided to use a lazy spool on.
Theoretically I could use the new option to disallow spool use, but I find maxdop simpler.
I am in a unique situation because the calculations are isolated (single user). A different situation may require an alternative to using maxdop limit to avoid contention.