ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Why stored procedure is faster than normal SQL query?

user-image
تم إضافة السؤال من قبل Bhavin Patel , .Net Developer , Imaker Infosoft
تاريخ النشر: 2013/04/19
Ahmed Gamal
من قبل Ahmed Gamal , Senior Microsoft Dynamics AX Developer , Bi-Technologies

bec The first time the stored procedure is run, it gets compiled.
This produces an execution plan read more http://stackoverflow.com/questions/22907/which-is-better-ad-hoc-queries-or-stored-procedures http://discuss.joelonsoftware.com/default.asp?dotnet.12.500091.75

mohamed sherif
من قبل mohamed sherif

Stored procedure can reduced network traffic and latency, boosting application performance.
Stored procedure execution plans can be reused, staying cached in SQL Server’s memory, reducing server overhead.
Stored procedures help promote code reuse.
Stored procedures can encapsulate logic.
You can change stored procedure code without affecting clients.
Stored procedures provide better security to your data.

Adnan Hamdani
من قبل Adnan Hamdani

Once created, that can be used again and again without doing compilation. That will save compilation time and get result in less time.

 

and the drawback

 

Stored procedure code is not as robust as app code, particularly in the area of looping (not to mention that iterative constructs, like cursors, are slow and processor intensive

المزيد من الأسئلة المماثلة