Forum Discussion
Limiting Distributed Requests
Hi jamesneal jamesneal6927 , as v-cboorla-msft mentioned we do not have plans to support/expose a maxdop like feature. I am really interested to learn more about your loading scenario however. If you are running into errors because of how you are parallelizing it would be interesting to learn more. How are you kick off this job? The only way I see that you could be running into error is if your two FOREACH loops are updating the same tables at the same time, therefore I am not sure how MAXDOP exclusively solves your problem. Are you using TRANSACTIONS?
steve-msft - I'm inserting/updating the same sys_log table with the BEGIN/END/ERROR data from ALL these parallel thread (as stated before). By me throttling those commands from ALL the other parallel file loads I should be able to manage that single table demand. Unless you have a better idea on how to properly manage a log table in this isolation environment.
- KevinConanMSFT2 years agoMicrosoft Employee
Greetings James!
You shouldn't need to throttle or limit in any way the inserts. They will not cause any blocking (either for other DML or selects).
For Updates and Deletes, based on what you've said about your workload, you'd want to keep those in as small of transactions as possible and implement try/catch logic for when there are conflicts between 2 concurrent transactions both have updates/deletes.