Skip to main content
added 27 characters in body
Source Link

Forrest is mostly right, but the finer details are:

SQL Server can't parallelize modifications to table variables, which your function uses.

Prior to SQL Server 2017's Interleaved Execution, row estimates from table variablesMulti-Statement Table Valued Functions were very low. 

One side effect of this is that plans were costed very poorly on the low end, and often wouldn't break cost threshold for parallelism.

Forrest is mostly right, but the finer details are:

SQL Server can't parallelize modifications to table variables, which your function uses.

Prior to SQL Server 2017's Interleaved Execution, row estimates from table variables were very low. One side effect of this is that plans were costed very poorly on the low end, and often wouldn't break cost threshold for parallelism.

Forrest is mostly right, but the finer details are:

SQL Server can't parallelize modifications to table variables, which your function uses.

Prior to SQL Server 2017's Interleaved Execution, row estimates from Multi-Statement Table Valued Functions were very low. 

One side effect of this is that plans were costed very poorly on the low end, and often wouldn't break cost threshold for parallelism.

Source Link

Forrest is mostly right, but the finer details are:

SQL Server can't parallelize modifications to table variables, which your function uses.

Prior to SQL Server 2017's Interleaved Execution, row estimates from table variables were very low. One side effect of this is that plans were costed very poorly on the low end, and often wouldn't break cost threshold for parallelism.