Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Do comments slow SProcs?

Author  Topic 

Kristen
Test

22859 Posts

Posted - 2004-06-08 : 15:26:22
I dunno if SProcs are "interpretted" - as part of parsing or whatever. Do they just store a query plan in the cache, such that they have to ne re-parsed each time, or are they the equivalent of "compiled"?

I'd just appreciate the perceived local wisdom before I buzz off making experiments.

If my SProcs can run faster taking out extraneous comments and whitespace I'd happily build a "compressor" - we do that for HTML, ASP, CSS, JavaScript ... erm ... that about wraps it up, except for SQL.

Kristen

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-06-08 : 15:27:04
The compiler ignores them.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2004-06-09 : 12:52:17
Sorry, need to make my question clearer:

Does it take time to ignore them? I mean, it has to load the [obese] source from somewhere, then parse it - which means stepping through the comments looking for the end of comment / line.

Now, if it does that once and stores the "lean" version for the next time, or turns it into some sort of intermediate code, it only has to do that once. But if it has to do that every time it executes one; or every time if it recompiles it, or can't find a query plan, then I think it will be worth testing whether putting the SProcs on a diet before creating them on QA and Production servers improves performance.

Kristen
Go to Top of Page
   

- Advertisement -