Is this a good idea or a really, really dumb one?

  • Ozymandias_EBON - Wednesday, October 4, 2017 8:24 AM

    stevenb 14609 - Tuesday, October 3, 2017 1:21 PM

    You have to be careful with functions, because there are a lot of ways that you can write a function that will kill your performance. One of the biggest ones is that anything that uses certain kinds of functions (like a multi-statement function) will make SQL Server unable to use a parallel plan. That's a big killer, especially in a DW scenario where you might be doing a lot of data processing.
    So before you start down the path of making functions, make sure you read up on what you have to do to make SQL Server be able to work well with them.

    I don't believe I would be using multi statement function but that is a great piece of advice.  Thank you!!!

    Scalar functions are almost as bad (in a different way)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply