SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Performance


Performance

Author
Message
tonyarp05 61903
tonyarp05 61903
SSC Veteran
SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)

Group: General Forum Members
Points: 245 Visits: 267
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
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59363 Visits: 13297
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.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Chris Harshman
Chris Harshman
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10503 Visits: 4635
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.
tonyarp05 61903
tonyarp05 61903
SSC Veteran
SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)SSC Veteran (245 reputation)

Group: General Forum Members
Points: 245 Visits: 267
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
Bhuvnesh
Bhuvnesh
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12594 Visits: 4077
tonyarp05 61903 (12/9/2012)
Def, I will go with different Stored procedure for each functionality
Please 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;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search