I have a task which receives an input and performs a series of tasks on the SQL server, which some depend on the content of the server and on the input. For that I use a lot of select
s and then logic based on input and then insert
or update
. The network activity between the server and the client is high while performing those tasks because they depend on the content of the server.
Will I gain any significant boost or degrade in performance if I move this to a stored procedure while the sql server and client are on the same machine?
Best Answer
Yes you will get a performance boost if you do this entirely on the server as the IO will be contained entirely inside the database server. However, at the same time you will introduce a performance hit on the server potentially.
It's a trade-off but I'd say it's worth it if you have spare capacity.