Forum Discussion
Dixus
Dec 12, 2022Copper Contributor
Parallized Stored Procedure executed synchron
Hi, we used a foreach loop to do calculations with a stored procedure. This used to work very well but for no reason the time went from some minutes to some hours and sometimes we get error messag...
- Dec 20, 2022
Dixus, the default max degree of parallelism (MAXDOP) parameter for Azure SQL Databases is 8, so if your database is configured with this value, it may be causing you to exceed the threshold of 400 when executing 50 queries in parallel. If all queries need to run concurrently, first attempt to use an adjusted MAXDOP query hint at the query level to override the database setting, and then consider updating the database scoped configuration.
If the queries can be grouped into smaller batches run sequentially, then you can also update the Batch count property of the For Each activity.
ericpasztor
Microsoft
Dec 20, 2022Dixus, the default max degree of parallelism (MAXDOP) parameter for Azure SQL Databases is 8, so if your database is configured with this value, it may be causing you to exceed the threshold of 400 when executing 50 queries in parallel. If all queries need to run concurrently, first attempt to use an adjusted MAXDOP query hint at the query level to override the database setting, and then consider updating the database scoped configuration.
If the queries can be grouped into smaller batches run sequentially, then you can also update the Batch count property of the For Each activity.