Ch 14 ParallelDemo executing the batch file
In ch 14, I executed the batch file, correcting the path to and name of the package. A window popped up asking me with what application I would like to open the DTSX file. I selected Execute Package Utility and immediately knew I had made the wrong choice. Of course the selected application popped up, with ParallelDemo.dtsx filled in, and I clicked Execute.
What application for processing the package was I supposed to select?
Upon clicking Execute, the package executed and completed the loop; all the ctlTaskQueue records were updated. All the loop iterations were executed with the same thread. I think that this is not what we wanted.
I closed the Execute Package Utility, and the command window displayed a new output line indicating a second thread has been spawned. With all the records in table ctlTaskQueue updated, there was now nothing to do in this new thread.
Accepting that Execute Package Utility was the wrong application to be executing, it seems that in order for each iteration of the package loop to be in a separate thread, the execution of ctl_UseTask - containing SELECT and UPDATE statements - must complete before the batch file iterates to the next thread spawn and begins execution of the next SELECT from ctlTaskQueue. It is not OBVIOUS that ctl_UseTask will be faster than a single iteration in the batch file loop, but I suppose that this could be the case.
|