tag:blogger.com,1999:blog-3617908412741200959.post6226748695630486890..comments2024-03-18T22:03:43.359-07:00Comments on sql.sasquatch: SQL Server 2019 Scalar UDF inlining - OOM in some casesSQL_Sasquatchhttp://www.blogger.com/profile/13470482959972282429noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-3617908412741200959.post-791609391557147482019-11-26T10:58:14.020-08:002019-11-26T10:58:14.020-08:00For all the options to disable Scalar UDF Inlining...For all the options to disable Scalar UDF Inlining - if you are hitting this issue - refer to https://docs.microsoft.com/en-us/sql/relational-databases/user-defined-functions/scalar-udf-inlining#disabling-scalar-udf-inlining-without-changing-the-compatibility-levelAnonymoushttps://www.blogger.com/profile/05010216272690004723noreply@blogger.comtag:blogger.com,1999:blog-3617908412741200959.post-42100355427307259622019-11-26T10:14:37.801-08:002019-11-26T10:14:37.801-08:00We have a fix scheduled for SQL 2019 CU2. It will ...We have a fix scheduled for SQL 2019 CU2. It will be in Azure ASAP too. It's a narrow case, but if Scalar UDF Inlining or other #IQP feature causes an issue for anyone, there is a simple immediate mitigation: disable it via DB scoped config or USE HINT https://docs.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-query#use_hint<br /><br />Pedro Lopes - MSAnonymoushttps://www.blogger.com/profile/05010216272690004723noreply@blogger.comtag:blogger.com,1999:blog-3617908412741200959.post-55807120721606984112019-11-25T11:44:53.035-08:002019-11-25T11:44:53.035-08:00Yep. I don't think I'll write more about i...Yep. I don't think I'll write more about it till a fix is available. But it's important to know that this effect is wide-ranging. It's not just a hockeystick that suddenly appears, but even with fewer logic branches the amount of optimizer memory used can both increase compile times and effect memory use throughout the SQL Server instance.sql_handlehttps://www.blogger.com/profile/13037521999936681073noreply@blogger.comtag:blogger.com,1999:blog-3617908412741200959.post-57787808507082760672019-11-25T00:27:10.501-08:002019-11-25T00:27:10.501-08:00Amazing...thanks for bringing this up. At first I ...Amazing...thanks for bringing this up. At first I thought "Well who on earth is gonna write a function like that?"...however reality often told me that such thoughts often are misleading. One more reason to thoroughly test new features based on your environment and your workload before putting them into production.Martin Guthhttps://www.blogger.com/profile/16324377966020549981noreply@blogger.com