December 7, 2012 at 4:26 am
Hi,
I am developing one tool. I need to write to stored procedure for each and every functionality.
Should i write single and call all the functionality in that? OR I can write different Stored procedure for different functionality?
Which will give us good performance? please give idea on this
Regards,
Tony
December 7, 2012 at 5:49 am
Your questions is too vague to give a decent answer on.
You can create different stored procedures for different functionality. I wouldn't want to create one single sp for everything, just out of usability, manageability and maintainability perspective.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
December 7, 2012 at 7:58 am
What you will need to balance are code reusability vs. performance. If you put too much functionality inside one stored proc, thent he query optimizer will have a more difficult time determining the best execution plan and you may have problems such as parameter sniffing creep up. I'd create different stored procedures for different functionality, as long as the functionality was on different criteria. I suppose to make more sense of this discussion you'd have to tell us what the different functionalities were, how many tables involved, etc.
December 9, 2012 at 11:16 pm
This tool for search the results in DB and give the output to front end.
There are lot of functionality!
1.Search(10 seperate search functionality) - can be done through 10 to 15 tables
2.Add - Can be done through near 20 tables
...
Def, I will go with different Stored procedure for each functionality
Please let me know if you can give more input.
REgards,
Tony
December 10, 2012 at 3:14 am
tonyarp05 61903 (12/9/2012)
Def, I will go with different Stored procedure for each functionalityPlease let me know if you can give more input.
i will suppport you for this as it will give you more readability and easiness to troubloeshoot any issue.
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply