Calling SP's V Running Query in code

~J~

~J~

Soldato
Joined
20 Oct 2003
Posts
7,558
Location
London
Quick question:

As a VERY simple example, if I wanted to return data from a SQL server by running a query, would it be quicker to call a Stored Procedure from a VB.Net application or running the query syntax from code?
 
Mr^B said:
It's *usually* quicker to use a Stored Procedure - as you don't have to wait for it to compile the execution plan each time it runs. However this isn't always the case.

Yeah, you've answered what I thought. I'm in the middle of designing a new app for a customer and they've a bit of a "know it all" at their place who I think "may" mess about with the SP's if they're on the server (or enhance them without paying us!) and thought it would be more secure to put them in the code. But didn't want an impact on performance.

Tricky one.
 
Back
Top Bottom