Are there techniques to replace
- UDF
- tabled value functions with something else?
or techniques to make them acceptable? (fast, multithreading and with good estimations)
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityNo 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.