Hello all,
Its necessary to write stored procedure for select queries that returns multiple records??
Whats performance difference if i run a select query using stored procedure
stead of running query through any server language???
Hello all,
Its necessary to write stored procedure for select queries that returns multiple records??
Whats performance difference if i run a select query using stored procedure
stead of running query through any server language???
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Josip Majic20 reputationPosted Mar 19, 2008, 5:26 AM EDT
Depends on a lot of factors; please describe what is your app trying to acomplish.
Generally, you will get a better performance and security with a stored procedure approach.
Vijaya KadiyalaRank #1,085 · 1.8K reputationPosted Apr 8, 2008, 7:24 AM EDT
Hi,
If you put your query inside the stored procedure the performance will always be better. The other advantage is It brings up the Loosely coupled dependecy between the front-end application with the database. coz in side the procedure you can have complex logic to write teh data...even if there is a change to the logic the front-end application will not have any impact.
Thanks -- Vj
http://dotnetvj.blogspot.com
Bechir BejaouiRank #144 · 15.9K reputationPosted Jun 3, 2008, 3:12 PM EDT
CREATE PROCEDURE CheckIfUserIsValid
@UID VARCHAR(20),
@PASS VARCHAR(20)
AS
SELECT * FROM MEMBERS WHERE UserId = @UID AND Password = @PASS
RETURN
GO
Sudheendra DesaiRank #4,252 · 355 reputationPosted Jun 4, 2008, 3:43 AM EDT
u can cache the data on application side and use the results, no need of again and again calling strd procs
Therese Puno15 reputationPosted Jun 9, 2008, 12:29 AM EDT
Base in my exprience stored procedure is much more advantage special client server application