Come see us

100 Brunswick Street
Glasgow G1 1TF


t: 0141 559 5840
f: 0141 559 5841
digital@framecreates.co.uk

Something a lot of us do is create SQL statements inline or in stored procedures but never really think of what is happening.  When you create a simple stored procedure like:

SELECT * FROM MyTable

what happens is that SQL Server (am not sure about other databases sorry) goes off, checks a couple of previous statement calls incase it has already got an execution plan for this stamtent, runs the statement, and returns the result.  However the results that it sends back contains more data than we need most of the time.

By adding the following

SET NOCOUNT ON

At the top of your SQL Store Proc or statement if inline, you can reduce the amount of network traffic.  If your site is heavily hit and you haven't got a proper caching system in place, this could help speed up your site.

Bookmark and Share

Posted in: Labs

Comments

12/17/2009 2:29:39 AM
cash loans
I always wanted to write in my site something like that but I guess you'r faster Smile

Add comment


(Entering your email address will show your Gravatar icon)

  Country flag
biuquote
  • Comment
  • Preview
Loading