I want to write a simple single line query to select only one value from database.
So if I write stored procedures for this query rather than writing simple select query in c# code, then I am sure that stored procedure for this simple select query will be faster but why?
I am confused with stored procedure vs writing simple query in my code?
I am confused that why stored procedure are faster than simple one query written directly in code?
This is a myth, the performance is always equivalent, from the book: Architecting Microsoft® .NET Solutions for the Enterprise: