SQL Server Performance

Sproc run without using parameters and with parameters..

Discussion in 'SQL Server 2005 T-SQL Performance Tuning' started by rohit_kochar, Jan 20, 2009.

  1. rohit_kochar New Member

    I have created a CLR stored procedure in C#. To call the sproc I am doing like this
    " Exec sepocname 'parame1' , 'param2' ...." from my C# code..
    My question is what is the difference between calling my sporc this way and calling it with using parameters...
    I mean I can use the microsoft API to add paramemets in command object and then run it using executenonquery..
    I hope my question is very clear..is there any performance variation by running the query in twwo different ways??
  2. satya Moderator

    Welcome to the forums.
    Brad has written few tips here:
    • Stored procedures help promote code reuse. While this does not directly boost an application's performance, it can boost the productivity of developers by reducing the amount of code required, along with reducing debugging time.
    • Stored procedures can encapsulate logic. You can change stored procedure code without affecting clients (assuming you keep the parameters the same and don't remove any result sets columns). This saves developer time.

Share This Page