Do comments affect performance? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Do comments affect performance?

Do comments negatively affect performance in a stored procedure? I don’t think they do, but haven’t been able to find any proof either way yet. (still looking) From my understanding MS SQL Server doesn’t actually execute the stored procedure, per se, but rather executes the optimized execution plan created from the blueprint the stored procedure provides. Therefore I would assume that other than at first-compile time when the comments have to be ‘skipped over’, there could be no performance issue. Am I correct in this assumption? Even so, how costly could this possibly be? Any insight into this would be greatly appreciated. Thanks,
v/r Gooser ‘Why do today
that which might not need to be done tomorrow?’ –me
Yes, they don’t tend to affect any if you have commented the writeup correctly.
If the performance is affected try to recompile the plan and invovled triggers with selective indexes within the query. Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided �AS IS� with no rights for the sake of knowledge sharing.
]]>