Hacker News new | ask | show | jobs
by timlin 3462 days ago
The biggest problem with scalar UDFs is not the IO performance. It is that they force the query to serial (non-parallel). On queries that return a non-trivial quantity of data, that hurts.

https://www.brentozar.com/blitz/blitz-result-user-defined-fu...

http://sqlblog.com/blogs/paul_white/archive/2011/12/23/forci...

1 comments

I'm curious, how do you spot this "forces parallel" on a query plan? Or is this one of those magic things you have to just know?

Would it make more sense to have a precompiler go through and inline my UDFs? They seem pretty amenable to a macro-expansion.