SQL Server 2019 CU11 is out! ....and again on Scalar UDF Inlining

Hi Guys,

The SQL Server CU 11 is out. 

Looking to the Microsoft changelog there aren't great imprevements from point of view of the performance, but from what i can see there is another update on the "Scalar UDF Inlining" saga!

We talked about Scalar UDF inlining here: SQL Server, boost your UDFs!

Yes i really think that UDF inlining (debut with SQL Server 2019 in order to increase performance) will became an important technology but what is happened unfortunately is a little different.

Due to errors, at each CU Microsoft restricted the action and the functionality of the Inlining..

For example in the CU2 inlining is blocked if the UDF references built-in views (for example . OBJECT_ID) or when aggregate functions are passed as parameters to a scalar UDF. Again if the UDF references certain intrinsic functions (for example @@ROWCOUNT.

Updating to the CU4 inlining is blocked if the UDF uses XML methods or contains a SELECT with ORDER BY without a "TOP 1" and even if the SELECT query performs an assignment in conjunction with the ORDER BY clause (for example, SELECT @x = @x +1 FROM table ORDER BY column_name)

And so on CU after CU..

I think that probably the internal logic inside this concept is not again mature, but at last microsoft shows that he wants to continue on this path!


and now CU 11 and inlining

Also this latter CU has its new cases where the inlining is blocked. 

Inlining is blocked if the UDF references encrypted columns or  to 'WITH XMLNAMESPACES' or if the query invoking the UDF has a CTE.


SQL Server 2021

By the Way, the first  rumors are already being heard about the new SQL Server 2021!Who guesses in which month it will be announced?



That's all for today my friends!  

Have a great week and share knowledge!!!

Luca Biondi @ SQLServerPerformance blog 2021!


Previus post:How to change Sql Server name. A micro tips!

Comments

Post a Comment

I Post più popolari

SQL Server, execution plan and the lazy spool (clearly explained)

SQL Server, datetime vs. datetime2

La clausola NOLOCK. Approfondiamo e facciamo chiarezza!