by Pxtl · 9y ago · 0 comments
I tried optimizing them out. Nothing. Looked at the query plans - 0%. SQL server had reasonably noticed what they were and done a bang-up job handling them.
That's the infuriating thing about SQL server "advice" - it's such a black box that so many of the rules are cargo-cult stuff.
https://www.brentozar.com/blitz/blitz-result-user-defined-fu...
http://sqlblog.com/blogs/paul_white/archive/2011/12/23/forci...
Would it make more sense to have a precompiler go through and inline my UDFs? They seem pretty amenable to a macro-expansion.