UDF - Performance

  • Would there be any performance issue if i'll write too many comments in UDF?

    How SQL Server works when a UDF is called? Does it compiles first and knock off all the comments are comments are overhead?

    Any help or reference is appreciated.

  • Don't think so. I just created a test function and created a comment that was 11,000 lines long and it made no difference to the execution times. I think that SQL Server just parses the code and skips past the comments and it clearly has an efficient parser.

  • thanks. that was the answer i was looking for

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

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