0

Are there techniques to replace

  • UDF
  • tabled value functions with something else?

or techniques to make them acceptable? (fast, multithreading and with good estimations)

1 Answer 1

1

No easy way unless you are on SQL2017 for table valued functions and not UDFs.

However on SQL 2019 scalar UDFs May perform little better but there are still lots of catches involved

By default parallelism is inhibited while using the UDFs within code, mind you the function part itself can go parallel though.

Your best part if not on latest sql server version would be to inline the function. That is simply copying the work of function inside your code rather than calling function from the code.

1
  • ehm I mismatched, actually I am on SQL2017 not SQL2016 ,thank you for the advice Sep 24, 2020 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.