The magic of Scalar-valued function inlining in SQL 2019

When one of my clients asked me for a reason to upgrade to SQL 2019, the first thing that came to mind is Scalar-valued function inlining. Reason? Well, for some reason developers like stuffing their SQL with SVFs, and that… makes… it… so… slow. Are SVFs really that bad? And is scalar-valued function inlining useful at all? Let’s walk through it together and find out!