Using functions to request large data sets

  • Hi All

    I have recently noticed developers including functions within quite a lot of procedures. Most often these functions are called and used as a table as the function themselves return a table.

    I understand this can severely hit performance, my questions is that generally speaking, what are the alternatives ?

    Thanks

  • The Alternative would be to remove the logic that is contained in the function and add this to your procedure, it could be added as a CTE or Temp table, the performance gain (if any) really depends on a lot of factors.

    Best idea would be to look at your exec plans with functions and wihtout funcitons to see what the gains are..

Viewing 2 posts - 1 through 1 (of 1 total)

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