Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Mazenx
Starting Member
5 Posts |
Posted - 2011-01-27 : 07:40:07
|
hello all , I am creating new application and it's going to have hundreds of procedures , my main issue is the speed , I want it to be incredibly fast so I am facing a choice now...I can create each stored procedure to be doing it's job alone without other procedures help ( which i think has performance advantage ) or I can make a procedure get help by another stored procedure ( while using if statements for the helper procedure to handle calls ) which i think seems better design but slower performance ....so which way i shall go? |
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-01-27 : 07:48:06
|
If your interest is speed, spend some more time on table structure and design..this will reduce the number of procedures you have to create. There is no "general" answer to your question.From a code re-usability standpoint, avoid coding the same exact logic into multiple procedures. You may have a series of procedures that do specific tasks...and another that determines which of those to call (your "if" scenario I suppose). Only you can decide which will work for you, and only testing will yield results for performance. Poor planning on your part does not constitute an emergency on my part. |
|
|
denis_the_thief
Aged Yak Warrior
596 Posts |
Posted - 2011-01-27 : 09:02:34
|
Procedures calling other procedures is usually negligable. What usually takes the longest time is joining big tables with big tables. |
|
|
Mazenx
Starting Member
5 Posts |
Posted - 2011-01-28 : 07:46:29
|
Thanks guys. |
|
|
|
|
|