0

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:

  1. Create stored procedure which accepts list of id's (with table value parameter) .

  2. 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.

4

1 回答 1

0

这是一个分区表吗?如果不运行并行更新可能无济于事。它仍然是另一端的一组写入头。

于 2013-04-07T18:57:48.450 回答