• It's ultimately going to depend on what the function is and how it does it. Yes, inlining a function can yield some interesting perf gains, but again, they tend to fall into specific circumstances. So - there's not really a decent way to generalize. In both of the cases you mentioned, even if the function execution itself is faster due to inlining, there are lots of opportunities for derived tables to flat out beat this kind of setup (unless the inline function itself is a derived table setup).

    This is just one of those where you need to test, test and test. And did I mention to test?

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?