I have a data flow task with 2 components:
- OLEDB data source tasks that are a SELECT query:
SELECT ACCOUNTID
FROM JOBS
WHERE STATUS=3
- OLE DB Command task that does:
DELETE FROM ACCOUNT
WHERE ACCOUNTID=?
The logic is that any job with status id 3 has to result in deletion of the accountid from the account table.
I know that when step 1 returns multiple records, step 2 performs slow because it is an operation that happens on each record. Where as if I had staged the data from step 1 in a separate table and then in an execute sql task fired delete based on the staged table, then it would have been faster.
Since the number of rows returns will always be small (under 20), I am using the OLE DB Command task approach. My question is -
- Does the OLEDB source task pass each row into the OLE DB Command task, there by resulting the the OLEDB Command task processing one record at a time?
Or Does the OLEDB source task pass all the rows to the OLE DB Command task, and the OLE DB Command task processes one record at a time?
Once rows are extracted by the OLEDB source task, then where are they held before passing into the OLE DB Command task?
Until the completion of the OLE DB Command task, are the rows produced by the OLEDB Source task locked?


