I was asked to run a heavy update after DB conversion, for a given list of Orders ID's ,
I need to go over the list and handle each ID.
For example:
--Customer Table:
create table CustOrders ( ID int , CustFName varchar(10), CustLname varchar(10), Primary key(ID) )
For each id in the list, a stored procedure will update the record.
My first thought was to:
Create stored procedure which accepts list of id's (with table value parameter) .
For each id , do my stuff
But then I’ve realized it will take too much time and there for I came up with an idea
And try and run in a parallel mode, for example:
Try to run several stored procedure where each stored procedure handles different bulk of ID's ,
Divided by Mod operator for example .
This is the reason I have decided to publish the question, maybe you have a better idea how to write procedure which can run in parallel mode.