Four ways to improve scalar function performance

If you use scalar user-defined functions, and can't take advantage of new handling in SQL Server 2019, see some other ways to reduce the impact on performance.