February 26, 2009 at 10:58 pm
Hi,
I need to know which one gives a faster output: (A Nested Proc Or A Single Proc that has the definition of that Nested Proc)
Thanks in Advance
"I Love Walking In The Rain So No One Can See Me Crying ! " ~ Charlie Chaplin
February 26, 2009 at 11:23 pm
If the nested proc only works on one row at a time... "Death by SQL". 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
February 27, 2009 at 12:02 am
It depends on the SP logic.
1) If your SP contains statements which is repeating through out the SP then create Separate SP for those statements. In this case creating Nested SP gives better performance.
2) if your SP contains too many if conditions and execution of statements depends on the previous statement result or passed parameters or any hard coded values then better to use Nested SP.
3) If all the statements are unique and non repetitive statement then better to use Single SP.
February 27, 2009 at 3:32 am
Thanks
"I Love Walking In The Rain So No One Can See Me Crying ! " ~ Charlie Chaplin
February 27, 2009 at 3:42 am
Its a general question that you have asked. There are pros and cons for both.Whats the prupose you are trying to achieve?
"Keep Trying"
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply