question

tkv89 avatar image
tkv89 asked

Running concurrent /parallel update statements

I have a table that is basically records of items, with columns for each day of the month. So basically each row is ITEM A, Day1, Day2, Day3, ....I have to run update statements that basically trawl through each row day by day with the current day information requiring some info from the previous day. - Is there anyway to parallel-ize this on SQL Server Standard? I'm thinking of something like a buffer where I will submit each row as a job and the system basically manages the resources and runs the query - If the buffer idea is not feasible, is there anyway to 'chunk' these rows and run the chunks in parallel?
parallelism
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

What's the advantage of wanting to do this in parallel? When you say you get some info from the previous day,what sort of info? Is it a count of sales (for example)? What version of SQL Server are you running?
0 Likes 0 ·

1 Answer

· Write an Answer
tkv89 avatar image
tkv89 answered
Basically, there is a set "quantity per box" that I have to divide the daily quantity into. Any leftover/excess is carried forward into the next day and deducted from that day's calculation. Example : The box size is 100, today's quantity is 231, tomorrow's quantity is 79. The box size is rounded up, so today's box is 3X100 =300. The excess of 79 is carried forward and deducted from the next day, leaving the next day quantity as 100 If I can parallel-ise this, I should be able to improve performance as per parallel run, seeing as each record has to be handled a day a time. My SQL Server version is SQL Server 2014
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.