Sample Header Ad - 728x90

Forced serialization on inline table valued function

4 votes
1 answer
1072 views
Apologies if this is a stupid question. We are attempting to convert our multi-statement table valued functions (MSTVFs) to inline table valued functions (ITVFs), to avoid the forced serialization of queries. I have the following ITVF function (watered down), but the Execution Plan still says it has a Degree of Parallelism of 1. The actual function in question has three basic SELECT statements separated by UNION ALLs. Have I missed something? How can I avoid forced serialization here? CREATE FUNCTION dbo.Test (@i int) RETURNS TABLE AS RETURN SELECT @i as [i]; GO SELECT * FROM dbo.Test (2); GO https://www.brentozar.com/pastetheplan/?id=Hyn8o50D7 The instance has he following settings: - Cost Threshold for Parallelism = 5 - Max Degree of Parallelism = 0
Asked by user3399498 (595 rep)
Sep 6, 2018, 09:01 AM
Last activity: Sep 6, 2018, 07:23 PM