User-Defined-Functions

Tag: user-defined-functions

Microsoft is Breaking Database Compatibility Levels for SQL Server

Microsoft is Breaking Database Compatibility Levels for SQL Server

According to Microsoft’s documentation, ‘Database compatibility level … allow[s] the SQL Server Database Engine to be upgraded while keeping the same functional status for connecting applications by maintaining the same pre-upgrade database compatibility level."

But these days, the “functional status” of a database at a given compatibility level differs depending on whether you’re using SQL Server, Azure SQL Managed Instance, or Azure SQL Database – and in the hosted versions it may change anytime without notice. Surprise, your database behaves differently now!

The whole concept is breaking down, and this is bad news for users of both managed services and the boxed product.

Continue reading

Fix My Functions: Speeding Up Scalar and Table Valued UDFs (video)

Fix My Functions: Speeding Up Scalar and Table Valued UDFs (video)

Last week, I presented on the topic of TSQL User Defined Functions (UDFs) in SQL Server at the PASS Summit.

Continue reading

Find the Scalar Function Call: What It Means When It Hides in Probe Residual

Find the Scalar Function Call: What It Means When It Hides in Probe Residual

User defined functions are fairly simple to create in SQL Server, but figuring out exactly how they are being used can take a little time - even in a simple execution plan. This is because the functions can be tucked away into lots of different operators in the plan, even join operators.

The good news: once you learn what to look for, it’s not terribly complicated. There are some fancy terms involved, but the definitions are pretty simple.

Continue reading