9

Scalar UDF Inlining

 3 years ago
source link: https://techcommunity.microsoft.com/t5/azure-sql/scalar-udf-inlining-now-available-on-azure-sql/ba-p/2728372?WT_mc_id=DOP-MVP-4025064
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Scalar UDF Inlining

Scalar UDF Inlining now available on Azure SQL

Published Sep 07 2021 07:29 AM 1,508 Views

Scalar UDF inlining is now available for Azure SQL Managed Instance and Azure SQL Database.  This is a feature that is part of the Intelligent Query Processing (QP) family & was first introduced in SQL Server 2019 .  The goal of the Scalar UDF inlining feature is to improve performance of queries that invoke T-SQL scalar UDFs, where UDF execution is the main bottleneck.  A key aspect of this improvement is that it falls under the category of “It just runs faster”. You will automatically be eligible for intelligent query processing  without changing any code provided you are running applicable database compatibility level & the Scalar UDF conforms to the requirements   

Let’s have a quick recap on the “Scalar UDF Inlining” feature: 



What is a Scalar UDF? 

User-Defined Functions (UDFs) that are implemented in Transact-SQL and return a single data value are referred to as T-SQL Scalar User-Defined Functions.  

T-SQL UDFs are an elegant way of achieving code reuse and modularity across Transact-SQL queries. They help in building up complex logic without requiring expertise in writing complex SQL queries 

 Performance of Scalar User-Defined Functions:Historically, UDFs in SQL server were known to perform poorly. This has implicitly resulted in customers avoiding UDFs whenever possible. Some of the main reasons for poor performance were the following

 Let’s look at a simple example of a Scalar UDF to understand this:



DROP FUNCTION IF EXISTS [dbo].Left5FromString;  
GO  

CREATE FUNCTION [dbo].[Left5FromString](@String VARCHAR(50)) 
RETURNS VARCHAR(5) 
AS 
-- Returns the 5 left characters of the last name 
BEGIN 
DECLARE @left VARCHAR(5); 
SET @left = LEFT(@String, 5) 
RETURN @left
END; 
GO 

-- Now execute a query that references it 
SELECT CarrierTrackingNumber, dbo.Left5FromString(CarrierTrackingNumber), * 
FROM Sales.SalesOrderDetail 
ORDER BY 2 DESC 




The execution plan for this query in Azure SQL Managed Instance database (compatibility level 140 – which will have inlining disabled ) is as follows (notice how SQL Server does not allow intra-query parallelism in queries that invoke UDFs. They are invoked in an iterative manner, once per qualifying tuple):













Using scalar (UDF) generally causes SQL Server performance issues when used on a large number of rows, because it is evaluated for each row returned by the query as seen in the Xevents. Running a detailed trace can also  impact query performance of a query with a scalar UDF:





How does the Scalar UDF inlining feature help? 

With this “Scalar UDF inlining feature”, scalar UDFs are automatically transformed into scalar expressions or scalar subqueries that are substituted in the calling query in place of the UDF operator

These expressions and subqueries are then optimized. As a result, the query plan will no longer have a user-defined function operator, but its effects will be observed in the plan, like views or inline TVFs.  The operations inside the UDF are now no longer a black box, and hence the query optimizer is able to cost and optimize those operations 



Let’s look at the same scalar UDF when inlining is enabled. Notice how the inlined query can produce a parallel plan:













In this execution plan, will not see the UdfCpuTime and UdfElapsedTime attributes on the execution plan as seen in the previous plan because the query does not invoke any scalar function 

You may also use  Xevent query_tsql_scalar_udf_inlined to see if your UDF is inlined 







 NOTE: These numbers are based on a AdventureWorks database, running in Azure SQL Managed Instance- Business Critical Gen5 (8vcores). The numbers include compilation and execution time with a cold procedure cache and buffer pool for a simple scalar UDF example.The default configuration was used, and no other indexes were created.  Note that running a detailed trace can also  impact query performance of a query with a scalar UDF .



How do I enable Scalar UDF inlining for my Azure SQL Managed Instance?  

In Azure SQL DB and Azure SQL Managed Instance Scalar UDF inlining will be turned on by default.  Workloads are automatically eligible for Scalar UDF Inlining if compatibility level for the database is 150. Apart from this, there are no other changes required to be made to UDFs or queries to take advantage of this featureRead more atEnabling Scalar UDF Inlining 



Can I disable Scalar UDF inlining? 

Yes absolutely. The adoption of Scalar UDF inlining has been great and we see the count of queries taking tangible advantage of the feature on a daily basis is in the millions. We did see a few narrowly scoped issues post SQL 2019 which have been fixed in the subsequent Cumulative updates for On-prem KB4538581 - FIX: Scalar UDF Inlining issues in SQL Server 2019 (microsoft.com) and these fixes have been enabled for Azure too.  

But if Scalar UDF Inlining feature causes an issue for anyone, there is a simple immediate mitigation: Scalar UDF inlining can be disabled at the databasestatement, or UDF scope while still maintaining database compatibility level 150 and higher. Check Disabling Scalar UDF inlining 



What kind of scalar UDFs are inlineable? A fairly broad set of scalar UDFs are inlineable currently. There are a few limitations such as the T-SQL constructs allowed in the UDF. Read the entire list at- Inlineable scalar UDFs requirements 



Additional Resources 



If you have feedback on this feature or other features in the Intelligent QP feature family, please email us at [email protected]



You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

%3CLINGO-SUB%20id%3D%22lingo-sub-2728372%22%20slang%3D%22en-US%22%3EScalar%20UDF%26nbsp%3BInlining%26nbsp%3Bnow%26nbsp%3Bavailable%20on%20Azure%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2728372%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dsql-server-ver15%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EScalar%20UDF%26nbsp%3Binlining%3C%2FA%3E%20is%20now%20available%20for%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fservices%2Fazure-sql%2Fsql-managed-instance%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20SQL%20Managed%20Instance%3C%2FA%3E%26nbsp%3Band%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fen-in%2Fproducts%2Fazure-sql%2Fdatabase%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20SQL%20Database.%3C%2FA%3E%26nbsp%3B%20This%20is%20a%20feature%20that%20is%20part%20of%20the%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fperformance%2Fintelligent-query-processing%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIntelligent%20Query%20Processing%20(QP)%E2%80%AF%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3Efamily%20%26amp%3B%26nbsp%3Bwas%26nbsp%3Bfirst%20introduced%20in%20SQL%20Server%26nbsp%3B2019%20.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22iqp-feature-family.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308543iDFC3F3C3D9139369%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22iqp-feature-family.png%22%20alt%3D%22iqp-feature-family.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20goal%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dsql-server-ver15%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EScalar%20UDF%26nbsp%3Binlining%26nbsp%3Bfeature%3C%2FA%3E%20is%20to%20improve%20performance%20of%20queries%20that%20invoke%20T-SQL%20scalar%20UDFs%2C%20where%20UDF%20execution%20is%20the%20main%26nbsp%3Bbottleneck.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EA%20key%20aspect%20of%20this%20improvement%20is%20that%20it%20falls%20under%20the%20category%20of%20%E2%80%9CIt%20just%20runs%20faster%E2%80%9D.%26nbsp%3BYou%20will%20automatically%26nbsp%3Bbe%26nbsp%3Beligible%20for%20intelligent%20query%26nbsp%3Bprocessing%26nbsp%3B%26nbsp%3Bwithout%26nbsp%3Bchanging%26nbsp%3Bany%20code%20provided%20you%20are%20running%26nbsp%3Bapplicable%20database%20compatibility%20level%26nbsp%3B%26amp%3B%20the%26nbsp%3BScalar%26nbsp%3BUDF%20conforms%20to%20the%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dsql-server-ver15%23inlineable-scalar-udfs-requirements%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Erequirements%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3ELet%E2%80%99s%20have%20a%20quick%20recap%20on%20the%26nbsp%3B%E2%80%9C%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EScalar%20UDF%26nbsp%3BInlining%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%E2%80%9D%26nbsp%3Bfeature%3A%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3EWhat%20is%20a%20Scalar%20UDF%3F%26nbsp%3B%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fcreate-user-defined-functions-database-engine%3Fview%3Dazuresqldb-current%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EUser-Defined%20Functions%20(UDFs)%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bthat%20are%20implemented%20in%20Transact-SQL%20and%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Ereturn%20a%20single%20data%20value%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bare%20referred%20to%20as%20T-SQL%20Scalar%20User-Defined%20Functions.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3ET-SQL%26nbsp%3BUDFs%26nbsp%3Bare%20an%20elegant%20way%26nbsp%3Bof%20achieving%20code%20reuse%20and%20modularity%20across%26nbsp%3BTransact-SQL%26nbsp%3Bqueries.%20They%20help%20in%20building%20up%20complex%20logic%20without%20requiring%20expertise%20in%20writing%20complex%20SQL%20queries%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3EPerformance%20of%20Scalar%20User-Defined%20Functions%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%3CSPAN%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EHistorically%2C%20UDFs%20in%20SQL%20server%26nbsp%3Bwere%26nbsp%3Bknown%20to%20perform%20poorly.%26nbsp%3BThis%20has%20implicitly%26nbsp%3Bresulted%20in%20customers%20avoiding%26nbsp%3BUDFs%20whenever%20possible.%26nbsp%3BSome%20of%20the%26nbsp%3Bmain%20reasons%20for%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dazuresqldb-current%23performance-of-scalar-udfs%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Epoor%20performance%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bwere%26nbsp%3Bthe%E2%80%AFfollowing%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20data-leveltext%3D%22%251.%22%20data-font%3D%22Calibri%22%20data-listid%3D%221%22%20aria-setsize%3D%22-1%22%20data-aria-posinset%3D%221%22%20data-aria-level%3D%221%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIterative%20execution%3A%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%E2%80%AFUDFs%20are%20invoked%20in%20an%20iterative%20manner%2C%20once%20per%20qualifying%20tuple.%20This%20incurs%20additional%20costs%20due%20to%20repeated%20context%20switching%2C%E2%80%AF%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%20data-leveltext%3D%22%251.%22%20data-font%3D%22Calibri%22%20data-listid%3D%222%22%20aria-setsize%3D%22-1%22%20data-aria-posinset%3D%222%22%20data-aria-level%3D%221%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3ELack%20of%20costing%3A%E2%80%AF%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%26nbsp%3BSQL%26nbsp%3BQuery%20Optimizer%26nbsp%3Btreats%20UDFs%20as%20inexpensive%20black%20boxes%20and%20does%20not%20cost%20them%20currently.%E2%80%AF%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%20data-leveltext%3D%22%251.%22%20data-font%3D%22Calibri%22%20data-listid%3D%222%22%20aria-setsize%3D%22-1%22%20data-aria-posinset%3D%223%22%20data-aria-level%3D%221%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EInterpreted%20execution%3A%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%E2%80%AFUDFs%20are%20evaluated%20as%20a%20batch%20of%20statements%20which%20are%20executed%20sequentially.%20In%20other%20words%2C%20UDFs%20are%20effectively%20interpreted%20statement-by-statement.%E2%80%AF%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%20data-leveltext%3D%22%251.%22%20data-font%3D%22Calibri%22%20data-listid%3D%222%22%20aria-setsize%3D%22-1%22%20data-aria-posinset%3D%224%22%20data-aria-level%3D%221%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESerial%20execution%3A%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%E2%80%AFSQL%20Server%20does%20not%20allow%20intra-query%20parallelism%20in%20queries%20that%20invoke%20UDFs.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%2C%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%2C%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559685%26quot%3B%3A720%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3ELet%E2%80%99s%20look%20at%20a%20simple%20example%20of%20a%20Scalar%20UDF%20to%20understand%20this%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B134233279%26quot%3B%3Atrue%2C%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559685%26quot%3B%3A720%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-sql%22%3E%3CCODE%3EDROP%20FUNCTION%20IF%20EXISTS%20%5Bdbo%5D.Left5FromString%3B%20%20%0AGO%20%20%0A%0ACREATE%20FUNCTION%20%5Bdbo%5D.%5BLeft5FromString%5D(%40String%20VARCHAR(50))%20%0ARETURNS%20VARCHAR(5)%20%0AAS%20%0A--%20Returns%20the%205%20left%20characters%20of%20the%20last%20name%20%0ABEGIN%20%0ADECLARE%20%40left%20VARCHAR(5)%3B%20%0ASET%20%40left%20%3D%20LEFT(%40String%2C%205)%20%0ARETURN%20%40left%0AEND%3B%20%0AGO%20%0A%0A--%20Now%20execute%20a%20query%20that%20references%20it%20%0ASELECT%20CarrierTrackingNumber%2C%20dbo.Left5FromString(CarrierTrackingNumber)%2C%20*%20%0AFROM%20Sales.SalesOrderDetail%20%0AORDER%20BY%202%20DESC%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20execution%20plan%20for%20this%20query%20in%20Azure%20SQL%20Managed%20Instance%26nbsp%3Bdatabase%26nbsp%3B(compatibility%20level%20140%26nbsp%3B%E2%80%93%20which%20will%20have%26nbsp%3Binlining%26nbsp%3Bdisabled%26nbsp%3B)%26nbsp%3Bis%20as%20follows%20(n%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Eotice%26nbsp%3Bhow%26nbsp%3BSQL%20Server%20does%20not%20allow%20intra-query%20parallelism%20in%20queries%20that%20invoke%20UDFs.%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3EThey%20are%20invoked%26nbsp%3Bin%20an%20iterative%20manner%2C%20once%20per%20qualifying%20tuple)%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22beforeinlining.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308826iE7B4C50CA5A4B002%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22beforeinlining.png%22%20alt%3D%22beforeinlining.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22noparallel.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308827i3B6A50BB7DA628BD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22noparallel.png%22%20alt%3D%22noparallel.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22beforeudfstats.png%22%20style%3D%22width%3A%201105px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308828iF727881EC4C3C1E2%2Fimage-dimensions%2F1105x26%3Fv%3Dv2%22%20width%3D%221105%22%20height%3D%2226%22%20role%3D%22button%22%20title%3D%22beforeudfstats.png%22%20alt%3D%22beforeudfstats.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3EUs%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eing%26nbsp%3Bscalar%20(UDF)%20generally%20causes%20SQL%20Server%20performance%20issues%20when%20used%20on%26nbsp%3Ba%20large%20number%20of%26nbsp%3Brows%2C%20because%20it%20is%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eevaluated%20for%20each%20row%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Breturned%20by%20the%20query%26nbsp%3Bas%20seen%20in%20the%26nbsp%3BXevents.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3ERunning%20a%20detailed%20trace%20can%26nbsp%3Balso%26nbsp%3B%26nbsp%3Bimpact%26nbsp%3Bquery%20performance%20of%20a%20query%20with%20a%20scalar%20UDF%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Pooja_Kamath_9-1631018358097.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308528i4BDF216A249DC582%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Pooja_Kamath_9-1631018358097.png%22%20alt%3D%22Pooja_Kamath_9-1631018358097.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3EHow%20does%20the%26nbsp%3BScalar%20UDF%26nbsp%3Binlining%26nbsp%3Bfeature%26nbsp%3Bhelp%3F%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559738%26quot%3B%3A40%2C%26quot%3B335559739%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EWith%20this%20%E2%80%9CScalar%20UDF%26nbsp%3Binlining%26nbsp%3Bfeature%E2%80%9D%2C%20scalar%20UDFs%20are%20automatically%20transformed%20into%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Escalar%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eexpressions%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bor%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Escalar%20subqueries%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bthat%20are%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Esubstituted%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bin%20the%20calling%20query%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Ein%20place%20of%20the%20UDF%20operator%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E.%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThese%20expressions%20and%20subqueries%20are%20then%20optimized.%20As%20a%20result%2C%20the%20query%20plan%20will%20no%20longer%20have%20a%20user-defined%20function%20operator%2C%20but%20its%20effects%20will%20be%20observed%20in%20the%20plan%2C%20like%20views%20or%20inline%20TVFs.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20operations%20inside%20the%20UDF%20are%20now%20no%20longer%20a%20black%20box%2C%20and%20hence%20the%20query%20optimizer%26nbsp%3Bis%20able%20to%26nbsp%3Bcost%20and%20optimize%20those%20operations%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3ELet%E2%80%99s%20look%20at%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Esame%20scalar%20UDF%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bwhen%20inlining%20is%20enabled.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3ENotice%20how%26nbsp%3Bthe%26nbsp%3Binlined%26nbsp%3Bquery%26nbsp%3Bcan%26nbsp%3Bproduce%20a%20parallel%20plan%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22afterudf.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308833iC7758A507253CFB4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22afterudf.png%22%20alt%3D%22afterudf.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22dop.png%22%20style%3D%22width%3A%20381px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308834iAEAA998F416B9079%2Fimage-dimensions%2F381x309%3Fv%3Dv2%22%20width%3D%22381%22%20height%3D%22309%22%20role%3D%22button%22%20title%3D%22dop.png%22%20alt%3D%22dop.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22afterudfstats.png%22%20style%3D%22width%3A%20457px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308835i4B6C0304710C9DE1%2Fimage-dimensions%2F457x23%3Fv%3Dv2%22%20width%3D%22457%22%20height%3D%2223%22%20role%3D%22button%22%20title%3D%22afterudfstats.png%22%20alt%3D%22afterudfstats.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIn%20this%20execution%20plan%2C%26nbsp%3Bwill%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Enot%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bsee%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EUdfCpuTime%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Band%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EUdfElapsedTime%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Battributes%20on%20the%20execution%20plan%26nbsp%3Bas%20seen%20in%20the%20previous%20plan%26nbsp%3Bbecause%20the%20query%20does%20not%20invoke%20any%20scalar%20function%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EYou%20may%20also%20use%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EXevent%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3Equery_tsql_scalar_udf_inlined%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3Bto%20see%20if%20your%20UDF%20is%26nbsp%3Binlined%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Pooja_Kamath_11-1631018358096.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308526iCF64A7ECA0C2504C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Pooja_Kamath_11-1631018358096.png%22%20alt%3D%22Pooja_Kamath_11-1631018358096.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CI%3E%3CSPAN%20data-contrast%3D%22auto%22%3ENOTE%3A%20These%20numbers%20are%20based%20on%20a%26nbsp%3BAdventureWorks%26nbsp%3Bdatabase%2C%20running%20in%20Azure%20SQL%20Managed%20Instance-%3C%2FSPAN%3E%3C%2FI%3E%3CI%3E%3CSPAN%20data-contrast%3D%22none%22%3E%20Business%20Critical%20Gen5%20(8vcores)%3C%2FSPAN%3E%3C%2FI%3E%3CI%3E%3CSPAN%20data-contrast%3D%22auto%22%3E.%20The%20numbers%20include%20compilation%20and%20execution%20time%20with%20a%20cold%20procedure%20cache%20and%20buffer%20pool%20for%20a%20simple%20scalar%20UDF%20example.The%26nbsp%3Bdefault%20configuration%20was%20used%2C%20and%20no%20other%20indexes%20were%20created.%26nbsp%3B%20Note%20that%20running%20a%20detailed%20trace%20can%26nbsp%3Balso%26nbsp%3B%26nbsp%3Bimpact%26nbsp%3Bquery%20performance%20of%20a%20query%20with%20a%20scalar%20UDF%3C%2FSPAN%3E%3C%2FI%3E%3CI%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B.%3C%2FSPAN%3E%3C%2FI%3E%3C%2FP%3E%0A%3CP%20aria-level%3D%222%22%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559738%26quot%3B%3A40%2C%26quot%3B335559739%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20aria-level%3D%222%22%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3EHow%20do%20I%20enable%20Scalar%20UDF%26nbsp%3Binlining%26nbsp%3Bfor%20my%20Azure%20SQL%20Managed%20Instance%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559738%26quot%3B%3A40%2C%26quot%3B335559739%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIn%20Azure%20SQL%20DB%20and%20Azure%20SQL%20Managed%20Instance%20Scalar%20UDF%26nbsp%3Binlining%26nbsp%3Bwill%20be%20turned%20on%20by%20default.%26nbsp%3B%26nbsp%3BWorkloads%26nbsp%3Bare%26nbsp%3Bautomatically%20eligible%20for%20Scalar%20UDF%26nbsp%3BInlining%26nbsp%3Bif%26nbsp%3Bcompatibility%20level%26nbsp%3Bfor%20the%26nbsp%3Bdatabase%26nbsp%3Bis%26nbsp%3B150.%20Apart%20from%20this%2C%20there%20are%20no%20other%20changes%20required%20to%20be%20made%20to%20UDFs%20or%20queries%20to%20take%20advantage%20of%20this%20feature%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E.%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3ERead%20more%20at%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dazuresqldb-current%23enabling-scalar-udf-inlining%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3EEnabling%20Scalar%20UDF%20Inlining%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FA%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20aria-level%3D%222%22%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3ECan%20I%20disable%20Scalar%20UDF%26nbsp%3Binlining%3F%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559738%26quot%3B%3A40%2C%26quot%3B335559739%26quot%3B%3A0%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EYes%26nbsp%3Babsolutely.%26nbsp%3BThe%20adoption%26nbsp%3Bof%20Scalar%20UDF%26nbsp%3Binlining%26nbsp%3Bhas%20been%20great%20and%20we%20see%20the%20count%20of%20queries%20taking%20tangible%20advantage%20of%20the%20feature%26nbsp%3Bon%20a%20daily%20basis%26nbsp%3Bis%20in%20the%20millions.%20We%20did%20see%20a%20few%20narrowly%26nbsp%3Bscoped%20issues%20post%20SQL%202019%26nbsp%3Bwhich%20have%20been%20fixed%20in%20the%20subsequent%20Cumulative%20updates%26nbsp%3Bfor%20On-prem%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fsupport.microsoft.com%252Fen-us%252Ftopic%252Fkb4538581-fix-scalar-udf-inlining-issues-in-sql-server-2019-f52d3759-a8b7-a107-1ab9-7fbee264dd5d%26amp%3Bdata%3D04%257C01%257Cpookam%2540microsoft.com%257C773962e9a4294da6b91308d94df703aa%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637626545594260837%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3D6BWlz5SwWovqPWCeloFGhTFvKd2iZoCtuYw2sXkomEI%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EKB4538581%20-%20FIX%3A%20Scalar%20UDF%20Inlining%20issues%20in%20SQL%20Server%202019%20(microsoft.com)%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Band%26nbsp%3Bthese%26nbsp%3Bfixes%20have%20been%20enabled%26nbsp%3Bfor%20Azure%20too.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EBut%26nbsp%3Bif%20Scalar%20UDF%26nbsp%3BInlining%26nbsp%3Bfeature%26nbsp%3Bcauses%20an%20issue%20for%20anyone%2C%20there%20is%20a%20simple%20immediate%20mitigation%3A%26nbsp%3BScalar%20UDF%26nbsp%3Binlining%26nbsp%3Bcan%20be%20disabled%20at%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Edatabase%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%2C%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Estatement%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%2C%20or%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3EUDF%20scope%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bwhile%20still%20maintaining%20database%20compatibility%20level%20150%20and%20higher.%20Check%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dazuresqldb-current%23disabling-scalar-udf-inlining-without-changing-the-compatibility-level%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EDisabling%20Scalar%20UDF%20inlining%3C%2FA%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3EWhat%20kind%20of%20scalar%20UDFs%20are%26nbsp%3Binlineable%3F%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FFONT%3E%3CSPAN%3E%3CFONT%20color%3D%22%23000080%22%3E%26nbsp%3B%3C%2FFONT%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EA%26nbsp%3Bfairly%20broad%26nbsp%3Bset%20of%20scalar%20UDFs%20are%26nbsp%3Binlineable%26nbsp%3Bcurrently.%20There%20are%20a%20few%20limitations%20such%20as%20the%20T-SQL%20constructs%20allowed%20in%20the%20UDF.%26nbsp%3BRead%20the%26nbsp%3Bentire%26nbsp%3Blist%20at-%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dazuresqldb-current%23inlineable-scalar-udfs-requirements%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3EInlineable%20scalar%20UDFs%20requirements%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FA%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23000080%22%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3EAdditional%26nbsp%3BResources%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20data-contrast%3D%22auto%22%3ESQL%20Server%202019%20Announcement%3A%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sql%2Fintroducing-scalar-udf-inlining%2Fba-p%2F386270%22%20target%3D%22_blank%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EIntroducing%20Scalar%20UDF%20Inlining%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20data-contrast%3D%22auto%22%3EPublic%20documentation%3A%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fsql%252Frelational-databases%252Fuser-defined-functions%252Fscalar-udf-inlining%253Fview%253Dsql-server-ver15%2526viewFallbackFrom%253Dsql-server-2017%26amp%3Bdata%3D04%257C01%257Cpookam%2540microsoft.com%257C773962e9a4294da6b91308d94df703aa%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637626545594250845%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3D%252BbtQ4xjZDzmU7XiWcl%252BZ%252B5pj4v1W3q%252F%252Fa4TaFGKxCsI%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EScalar%20UDF%20Inlining%20in%20Microsoft%20SQL%20Server%20-%20SQL%20Server%20%7C%20Microsoft%20Docs%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20underlying%20techniques%20that%20describe%20how%20this%20feature%20works%20are%20described%20in%20a%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3Eresearch%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3Bpublication%E2%80%AFtitled%20%22%E2%80%AF%3C%2FSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fwww.vldb.org%2Fpvldb%2Fvol11%2Fp432-ramachandra.pdf%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EFroid%3A%20Optimization%20of%20Imperative%20programs%20in%20a%20Relational%20Database%E2%80%AF%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%22.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20data-contrast%3D%22auto%22%3EData%20Exposed%20Talks%3A%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2FShows%2FData-Exposed%2FSQL-Server-2019-Improves-Scalar-UDF-Performance%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3ESQL%20Server%202019%20Improves%20Scalar%20UDF%20Performance%20%7C%20Data%20Exposed%20%7C%20Channel%209%20(msdn.com)%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fsupport.microsoft.com%252Fen-us%252Ftopic%252Fkb4538581-fix-scalar-udf-inlining-issues-in-sql-server-2019-f52d3759-a8b7-a107-1ab9-7fbee264dd5d%26amp%3Bdata%3D04%257C01%257Cpookam%2540microsoft.com%257C773962e9a4294da6b91308d94df703aa%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637626545594260837%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3D6BWlz5SwWovqPWCeloFGhTFvKd2iZoCtuYw2sXkomEI%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EKB4538581%20-%20FIX%3A%20Scalar%20UDF%20Inlining%20issues%20in%20SQL%20Server%202019%20(microsoft.com)%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22auto%22%3EIf%20you%20have%20feedback%20on%20this%20feature%20or%20other%20features%20in%20the%20Intelligent%20QP%20feature%20family%2C%20please%20email%20us%20at%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%E2%80%AF%3C%2FSPAN%3E%3CA%20href%3D%22mailto%3AIntelligentQP%40microsoft.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20data-contrast%3D%22none%22%3EIntelligentQP%40microsoft.com%E2%80%AF%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22none%22%3E.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A240%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335559739%26quot%3B%3A160%2C%26quot%3B335559740%26quot%3B%3A259%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2728372%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22xxmsonormal%22%20style%3D%22text-align%3A%20center%3B%22%20align%3D%22center%22%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSTRONG%3E%3CSPAN%20style%3D%22font-size%3A%2014.0pt%3B%20color%3A%20black%3B%20background%3A%20white%3B%22%3ETSQL%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dsql-server-ver15%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EScalar%20UDF%26nbsp%3BInlining%3C%2FA%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22font-size%3A%2014.0pt%3B%20color%3A%20black%3B%20background%3A%20white%3B%22%3E%26nbsp%3Bis%20now%20available%20for%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2014.0pt%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fazure.microsoft.com%252Fservices%252Fazure-sql%252Fsql-managed-instance%252F%26amp%3Bdata%3D04%257C01%257Cpookam%2540microsoft.com%257Cab64242f3f584cef3e3908d971b6199d%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637665849330090246%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DmVFNct1FaGwCqk2aFy81S33XYHa225YEu0%252FxghU%252FwfU%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20%230563c1%3B%20background%3A%20white%3B%22%3EAzure%20SQL%20Managed%20Instance%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20background%3A%20white%3B%22%3E%26nbsp%3Band%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fazure.microsoft.com%252Fen-in%252Fproducts%252Fazure-sql%252Fdatabase%252F%26amp%3Bdata%3D04%257C01%257Cpookam%2540microsoft.com%257Cab64242f3f584cef3e3908d971b6199d%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637665849330100237%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3Dw6s4hGul%252FqErGg34DcrOu9EVGY%252BnQfx%252B1Dy%252FTIh3yGU%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20%230563c1%3B%20background%3A%20white%3B%22%3EAzure%20SQL%20Database%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FA%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20background%3A%20white%3B%22%3EThis%20feature%20is%20a%20part%20of%20the%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fdocs.microsoft.com%252Fen-us%252Fsql%252Frelational-databases%252Fperformance%252Fintelligent-query-processing%253Fview%253Dsql-server-2017%26amp%3Bdata%3D04%257C01%257Cpookam%2540microsoft.com%257Cab64242f3f584cef3e3908d971b6199d%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637665849330110232%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C1000%26amp%3Bsdata%3DVrWyUXxqWW6HXiBRBMUjyJSIqmmVjIC8VkRKBb6At5k%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20%230563c1%3B%20background%3A%20white%3B%22%3EIntelligent%20Query%20Processing%20(QP)%E2%80%AF%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20background%3A%20white%3B%22%3Efamily%20%26amp%3B%26nbsp%3Bwas%26nbsp%3Bfirst%20introduced%20in%20SQL%20Server%26nbsp%3B2019%20.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22xxmsonormal%22%20style%3D%22text-align%3A%20center%3B%22%20align%3D%22center%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22xxmsonormal%22%20style%3D%22text-align%3A%20center%3B%22%20align%3D%22center%22%3E%3CSPAN%20style%3D%22font-size%3A%2014.0pt%3B%22%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20background%3A%20white%3B%22%3E%3CSPAN%20data-contrast%3D%22auto%22%3EThe%20goal%20of%20the%20%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dsql-server-ver15%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EScalar%20UDF%26nbsp%3Binlining%3C%2FA%3E%3C%2FSTRONG%3E%26nbsp%3Bfeature%20is%20to%20improve%20performance%20of%20queries%20that%20invoke%20T-SQL%20scalar%20UDFs%2C%20where%20UDF%20execution%20is%20the%20main%26nbsp%3Bbottleneck.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22auto%22%3EA%20key%20aspect%20of%20this%20improvement%20is%20that%20it%20falls%20under%20the%20category%20of%20%E2%80%9CIt%20just%20runs%20faster%E2%80%9D.%26nbsp%3BYou%20will%20automatically%26nbsp%3Bbe%26nbsp%3Beligible%20for%20intelligent%20query%26nbsp%3Bprocessing%26nbsp%3B%26nbsp%3Bwithout%26nbsp%3Bchanging%26nbsp%3Bany%20code%20provided%20you%20are%20running%26nbsp%3Bapplicable%20database%20compatibility%20level%26nbsp%3B%26amp%3B%20the%26nbsp%3BScalar%26nbsp%3BUDF%20conforms%20to%20the%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Frelational-databases%2Fuser-defined-functions%2Fscalar-udf-inlining%3Fview%3Dsql-server-ver15%23inlineable-scalar-udfs-requirements%22%20rel%3D%22noopener%20noreferrer%22%20target%3D%22_blank%22%3E%3CSPAN%20data-contrast%3D%22none%22%3Erequirements%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20data-contrast%3D%22auto%22%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22xxmsonormal%22%20style%3D%22text-align%3A%20center%3B%22%20align%3D%22center%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22xxmsonormal%22%20style%3D%22text-align%3A%20center%3B%22%20align%3D%22center%22%3E%3CSPAN%20style%3D%22font-size%3A%2014.0pt%3B%22%3E%3CSPAN%20class%3D%22xnormaltextrun%22%3E%3CSPAN%20style%3D%22color%3A%20black%3B%20background%3A%20white%3B%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22iqp-feature-family.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F308537i5F3FF8CEBEACA022%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22iqp-feature-family.png%22%20alt%3D%22iqp-feature-family.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2728372%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20SQL%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%20Database%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20SQL%20Managed%20Instance%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E

Version history
Last update:

‎Sep 08 2021 07:58 AM

Updated by:

Recommend

  • 55
    • www.tuicool.com 6 years ago
    • Cache

    PySpark: Java UDF Integration

    PySpark is the Spark API implementation using the Non-JVM language Python. Though developers utilize PySpark by implementing Python Code using Spark API’s (Python version of Spark API’s), internally, Spark uses data to be...

  • 44

    This is the blog of the engineering team managing and developing the Database Engine for SQL Server and Azure SQL Database

  • 53
    • www.tuicool.com 5 years ago
    • Cache

    Scalar UDF Inlining in SQL Server 2019

    Scalar UDFs have always been a double-edged sword – they’re great for developers, who get to abstract away tedious logic instead of repeating it all over their queries, but they’re horrible for runtime performance in prod...

  • 25
    • 微信 mp.weixin.qq.com 5 years ago
    • Cache

    零基础学Flink:UDF

  • 9
    • zpz.github.io 3 years ago
    • Cache

    Integrating Hive UDF's in Python

    Integrating Hive UDF's in Python I need to do some pretty flexible things in my Hive queries, so flexible that it’s beyond the capability of Hive QL. Writing a Hive UDF (user defined function) is an option. However, all t...

  • 7
    • liyangliang.me 3 years ago
    • Cache

    Impala 添加和使用 UDF

    Impala 添加和使用 UDF Impala 支持 C++ 和 Java 编写的 UDF, 把对应的 so 或 jar 文件放到 HDFS,再注册一下就能使用。官方推荐使用 C++ 编写 UDF,相比 Java 的实现有 10 倍性能提升。Hive 有丰富的...

  • 10
    • database.51cto.com 3 years ago
    • Cache

    Hive基于UDF进行文本分词

      本文转载自微信公众号「Java大数据与数据仓库」,作者刘不二 。转载本文请联系Java大数据与数据仓库公众号。

  • 9

    组内一个服务中有个叫算子的模块,所谓 算子 可以理解为UDF(User Defined Function),这个模块的核心思想是:在做业务需求时,把业务拆解为几块通用的 业务代码(UDF) ,不同的代码块承担不同的业务功...

  • 10
    • blog.knoldus.com 3 years ago
    • Cache

    UDF overloading in spark

    UDF overloading in spark Reading Time: 2 minutesUDF are User Defined Function which are register with hive context to use...

  • 6

    1 min read CVE-2021-44521 Apache Cassandra 加载UDF RCE 2022-02-12 代码审计 UDF

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK