Thursday, February 16, 2012

Comments in SP

Hi,
I was wondering if the amount of comments inside a stored procedure could
hinder in any way the performance of the same sp. Does anyone know?
regards,AFAIK, Nope they have no impact on performance ...
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"Emmanuel" <emmanuel@.email.com> wrote in message
news:u%23PZw1zEFHA.732@.TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I was wondering if the amount of comments inside a stored procedure could
> hinder in any way the performance of the same sp. Does anyone know?
>
> regards,
>
>|||Apart from the time the compiler takes to parse the symbols in the procedure
source.
This is almost negligable and certainly discountable for the benefits of
having comments in your code. If it needs an essay the its probably better
in an external file with a reference note in the sproc header.
Mr Tea
"Vinod Kumar" <vinodk_sct@.NO_SPAM_hotmail.com> wrote in message
news:cusgo5$h7q$1@.news01.intel.com...
> AFAIK, Nope they have no impact on performance ...
> --
> HTH,
> Vinod Kumar
> MCSE, DBA, MCAD, MCSD
> http://www.extremeexperts.com
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
> "Emmanuel" <emmanuel@.email.com> wrote in message
> news:u%23PZw1zEFHA.732@.TK2MSFTNGP12.phx.gbl...
could
>|||While i haven't done any tests yet I suspect that lots of comments can
indeed affect performance on a system with lots of sp's. The reason being
is that the comments are also stored in the syscacheobjects when the plan is
created. This has several effects. One is that it takes up more memory for
the procedure cache. It also takes a little more effort to create the hash
code and do the searching in the cache once the hash bucket is identified.
Don't take me wrong here, I am not advocating removing all comments<g>.
But I have seen some large systems that had massive amounts of comments that
when added up, was well over 100MB's in coments. That is memory that could
be used by other processes. The bottom line is that most systems will never
notice any difference if they removed all their comments. But technically I
believe it can potentially affect performance.
Andrew J. Kelly SQL MVP
"Emmanuel" <emmanuel@.email.com> wrote in message
news:u%23PZw1zEFHA.732@.TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I was wondering if the amount of comments inside a stored procedure could
> hinder in any way the performance of the same sp. Does anyone know?
>
> regards,
>
>

No comments:

Post a Comment