Aug
6
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.
8953d1c7-d309-4a72-8f85-84694b5b2120|0|.0