How SQL server stored procedure reduce network traffic?

One of the biggest advantages of using stored procedures over not using stored procedures is the ability to significantly reduce network traffic. And the more network traffic that can be reduced, the better the overall performance of your SQL Server-based applications. How they do it?

Tags..  SQL Server  Stored Procedures  T-SQL
Posted by: Nigar Leeui | Views: 49 | Community Opinion/Answer: 1

Add Your Opinion

Bookmark this page..



Ask a New Question Go to Home


Community Opinion/Answers
vipin said..

When an application needs to retrieve one or more rows from SQL Server and then takes some action on this data, such as Inserting, Updating, or Deleting rows in the database based on the data retrieved, network traffic is significantly reduced if all this code is stored in a stored procedure. As before, it only takes a single RPC call to execute a stored procedure. But if all the code to perform these steps is not in a stored procedure, but located in the application, network traffic can be high.

For example, first, the application has to send the Transact-SQL code to SQL Server (lots of potential network traffic). Then SQL Server has to return the result set back to the client, then the client has to use the data, and then send additional requests (INSERT, UPDATE, DELETE) to SQL Server, and then SQL Server has to respond back to the client, and so on, until the task is completed. As you can see, this can generate a lot of network traffic. But if all the work is being done from within a stored procedure, network traffic is greatly reduced


What do you think? Add your opinion/answer
Your Name:
*your opinion/answer: